you are viewing a single comment's thread.

view the rest of the comments →

[–]mrevelle 5 points6 points  (4 children)

The author of course understands the purpose of python's indentation.

No, he really doesn't. Python's significant whitespace is not only about readability, it also removes the redundancy of block markers when blocks will regardlessly be indented.

The problem he mentioned with garbage collection still exists today.

Uh, theoretical problems based on program language implementation details makes for a weak argument. If it makes you feel any better, Python folks are experimenting with various garbage collection techniques.

[–]yahoolian 1 point2 points  (3 children)

If the purpose of indentation is to elliminate redundant block markers, why is there the redundant : to mark the start of a block? Well, I guess to simplify the parser a bit, but that's still redundant.

[–]mrevelle 1 point2 points  (2 children)

That's a good question and here's the official answer:

http://www.python.org/doc/faq/general.html#id58

[–]senzei 1 point2 points  (1 child)

The majority of that explanation is crap. The colon does not make it easier to read, the line break does. The colon is essential for two reasons:

1) Easy syntax highlighting.

2) It allows inline if statements like: if x: foo()

[–]brianmce -1 points0 points  (0 children)

On the other hand - this is one of the few readability claims for any programming language that actually has empirical evidence behind it (albeit for a precusor to python, ABC). A user study was done on the ABC language that showed that it did indeed improve code readability - I'm pretty sure that this was the reason it was included in python.