Linked by Eugenia Loli on Sat 15th Jul 2006 22:45 UTC
.NET (dotGNU too) Jeff Cogswell writes: "I'm about to make a confession. Even though I've written several books and articles about C++, I have a secret: C++ isn't my favorite language. I have lots of languages that I use, each one for different purposes. But the language I consider my all-time favorite is Python."
Thread beginning with comment 143618
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[7]: Python is . . .
by Cloudy on Sun 16th Jul 2006 19:56 UTC in reply to "RE[6]: Python is . . ."
Member since:

Perhaps I am misunderstanding you.

You're misunderstanding me.

Wirth banished goto from Pascal because it allowed certain 'undesirable' programming constructs. Doing so was an attempt to enforce readability by language design.

Python tries to enforce readability by language design by forcing indentation, including statement termination. But it's easy to write unreadable code in Python just as it was easy to write spaghetti code in Pascal.

By banishing the goto, Wirth actually made some things harder to write clearly, about which see Knuth's paper on goto structuring. So, the net effect was that Pascal didn't prevent unreadable code but did in some instances enforce unreadable code.

By forcing indentation, Python robs the programmer of certain constructs which can be used to indicate code structure, and it causes a different sort of typographic blindness, because of the tab substitution rule.

In other words, Python is like Pascal in that it attempted to do something to make code more readable that didn't really make the code more readable, but did eliminate some changes for readability.

Where you're getting confused about what I'm saying is that C allows one to write code that's at least as readable as Python because it allows one to properly indent. It allows readable code, but it doesn't attempt to enforce it. Whereas Python attempts to enforce readable code, but in doing so merely leads to different ways to write unreadable code while restricting programmers unnecessarily when there's a good reason to violate the convention of indentation.

Reply Parent Score: 1

RE[8]: Python is . . .
by Tuishimi on Sun 16th Jul 2006 20:54 in reply to "RE[7]: Python is . . ."
Tuishimi Member since:

This was a much more descriptive post! I understand what you are trying to say now. I still don't necessarily agree with what you are saying, but that's fine.

I still don't understand this: "Python robs the programmer of certain constructs which can be used to indicate code structure".

Indentation indicates a block of code, such as a loop, condition or other form of block statement. How does it rob the programmer of constructs that indicate code structure?

Reply Parent Score: 1