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 143801
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[7]: Python is . . .
by mexisme on Mon 17th Jul 2006 10:17 UTC in reply to "RE[6]: Python is . . ."
mexisme
Member since:
2006-07-17

Code indentation is great... except when it's not.

There are times when I explictly choose not to use indentation, and I get annoyed when a language chooses to tell me, for example "Use underscores instead of camel-case" or "Use spaces instead of tabs for indentation" where the reason is based on opinion.

It's the age-old "thou shalt do it this way" argument with Python, despite the programmer's wishes or better judgement.

And I have to say this: "GOTO" is sometimes just plain better, for all sorts of context-sensitive reasons. The comparison is because Wirth banished GOTO for a readability **opinion**.

Reply Parent Score: 1

RE[8]: Python is . . .
by CrLf on Mon 17th Jul 2006 14:09 in reply to "RE[7]: Python is . . ."
CrLf Member since:
2006-01-03

"And I have to say this: "GOTO" is sometimes just plain better, for all sorts of context-sensitive reasons. The comparison is because Wirth banished GOTO for a readability **opinion**."

I have never used "goto" (although I've used "setjmp", which is even worse).

It can be acceptable to jump into a common error handling block inside a function, but nothing else. And even there, the code can be refactored to avoid it, with other benefits besides eliminating "goto"s.

Other possible uses are in jumping out of deeply nested loops, but if you are doing deeply nested loops, then your code is broken far beyond the use of "goto".

Reply Parent Score: 1

RE[9]: Python is . . .
by Cloudy on Mon 17th Jul 2006 17:58 in reply to "RE[8]: Python is . . ."
Cloudy Member since:
2006-02-15

It can be acceptable to jump into a common error handling block inside a function, but nothing else.

Read Knuth's paper. There are several valid reasons for using a forward goto.

And even there, the code can be refactored to avoid it, with other benefits besides eliminating "goto"s.

Not always true. Especially when you have code that obtains resources in a certain order, operates on those resources, and then releases them in the reverse order, but has to bail if it can't obtain all of the resources. The cleanest way to write this code in C is to use forward gotos.

Other possible uses are in jumping out of deeply nested loops, but if you are doing deeply nested loops, then your code is broken far beyond the use of "goto".

Unless you're writing code that models N dimensional mathematics, such as physics simulation code, in which case deeply nested loops in non-vector languages is the only way.

Reply Parent Score: 1