Compare source code

Rustom Mody rustompmody at gmail.com
Thu Nov 4 22:47:02 EDT 2010


The real issue is not tabs/spaces vs braces but academic/scientific
orientation vs engineering/commercial needs.
Mostly these worlds are so far separated that no dialogue happens --
think C vs Pascal, Java vs Eiffel etc

The problem -- actually advantage -- is that Python straddles both worlds.
Mailers messing code, even editors messing (large) refactorings are
engineering concerns.
The visual clarity of (usually small) pieces of code is an academic concern.

Ive been in both worlds: being able to have a significant piece of
code projected on a single screen is often the single biggest factor
which makes something teachable or not.  And indentation based
structure is not the only thing that aids this in languages like
python and haskell -- think of comprehensions, no type declarations,
REPL removing the need for (most) print statements etc etc.

Conversely there are 'real-world' situations where python's
indentation breaks things -- eg python-server-pages where python's
indentation mixes badly with html's <tag> </tag>

As far as I am concerned python would not be python if its
indentation=structure went.  However the original question -- mixing
tabs and spaces is bad -- has got lost in the flames.  Do the most
die-hard python fanboys deny this?  And if not is it asking too much
(say in python3) that mixing tabs and spaces be flagged as an error or
at least warning?



More information about the Python-list mailing list