On Wed, Jan 02, 2008 at 02:00:09PM -0800, John H. Robinson, IV wrote:
Christopher Smith wrote:
James G. Sack (jim) wrote:
>
>I religiously avoid embedding TAB is any text.
>
I of course *know* you are totally wrong about TAB, but I'd settle for a
language that just chose a side and forced everyone to stick with one
way. Python's approach let's them mix and it's just a recipe for disaster.
I agree Python's approach is wrong. Whitespace should not be
syntactically significant, outside of separating tokens.
The opposite extreme would be <http://compsoc.dur.ac.uk/whitespace/> where
whitespace is the only signifcant character in the language.
I understand the only two valid arguments:
1) If you remove the braces from the different bracing style, you are
left with Python-mandated indenting.
2) There is no question which IF block the ELSE is associated with.
The basic argument behind the indent syntax is that with normal coding, the
nesting has to be specified twice, once with braces or other syntax, and
again with the indentation. Might as well make the syntactical one follow
the visual one that people can see.
Python isn't the only language that uses indentation for syntax. Haskell
does it to, in an even stranger way. You can use braces and semicolons.
The lexer can also insert them for you based on certain rules of
indentation.
Dave
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg