help explaining rationale for indentation
bushi
bushi at spiritone.com
Wed Aug 23 02:50:33 EDT 2000
More information about the Python-list mailing list
Wed Aug 23 02:50:33 EDT 2000
- Previous message (by thread): help explaining rationale for indentation
- Next message (by thread): help explaining rationale for indentation
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Well, having fought the 'brace wars' for years, I find just being able to indent as the marker for grouped code very refreshing. Using indentation has been a standard practice in my programming for some time. I can't tell you how many hours I've spent trying to track down a dropped brace or parenthesis especially when the indented code looked just fine. Granted, I'm still very new to Python but this is one feature that will surely make me a true believer. Rainer Deyke wrote: > "Grant Griffin" <g2 at seebelow.org> wrote in message > news:39A2EA36.8DC7746 at seebelow.org... > > If we all lived in a programming world where indentation was the norm > > (BTW, why hasn't anybody ever offered a braceless version of C/C++), I > > think braces would be a *VERY* tough sell. People would say, "Why do we > > need that?--all it does is clutter our code and lead to multiple ways of > > writing the same thing." > > One potential advantage of braces (or analogous syntactical elements) is > that they allow a higher degree of structural flexibility. For example, it > might be possible to embed statements in expressions (not just the other way > around) in a language that uses them. I personally think it would be nice > if Python did not need separate 'def's and 'lambda's. Imagine the > following, where 'function' is a hypothetical new keyword: > > map(something, function(x) { print x; }) > > In pragmatic everyday programming, however, I prefer the brace-less Python > style. > > -- > Rainer Deyke (root at rainerdeyke.com) > Shareware computer games - http://rainerdeyke.com > "In ihren Reihen zu stehen heisst unter Feinden zu kaempfen" - Abigor
- Previous message (by thread): help explaining rationale for indentation
- Next message (by thread): help explaining rationale for indentation
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list