LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   2007 LinuxQuestions.org Members Choice Awards (https://www.linuxquestions.org/questions/2007-linuxquestions-org-members-choice-awards-79/)
-   -   Programming Language of the Year (https://www.linuxquestions.org/questions/2007-linuxquestions-org-members-choice-awards-79/programming-language-of-the-year-610237/)

taylor_venable 02-29-2008 09:48 PM

Quote:

Originally Posted by jgombos (Post 3073184)
it varies from one context to the next. :eek:

Curious: what do you mean by that?

Also, I don't really understand why people are scared off by the whitespace thing, but it's probably just my anal nature to keep my code neat and clean that has made it a non-issue for me.

jgombos 02-29-2008 10:23 PM

Quote:

Originally Posted by taylor_venable (Post 3074500)
Curious: what do you mean by that?

I don't know exactly myself, because I didn't get past the intro in a python book before bailing on the idea. But someone told me the whitespace sometimes has meaning that changes depending on how much whitespace there is, under some circumstances. I said, no thanks. It's bad enough that the language is going to make style decisions for me. May be appropriate for a team environment, but not the individual.
Quote:

Originally Posted by taylor_venable (Post 3074500)
Also, I don't really understand why people are scared off by the whitespace thing, but it's probably just my anal nature to keep my code neat and clean that has made it a non-issue for me.

Everyone has a different idea of what's readable. You're apparently lucky that the language mandated layout appears clean to you.

I cannot stand the K&R format, but to others there's nothing more readable. And others find my Whitesmith style intolerable, when really there's no better choice.

paddy3118 02-29-2008 10:40 PM

Quote:

Originally Posted by jgombos (Post 3073184)
I started to give python a gander.. and got scared off upon discovering that whitespace actually has meaning - and that it varies from one context to the next. :eek:

It is indentation that has meaning rather than the more general 'whitespace'.

The rules for indentation in Python are:
  1. Indentation follows program logic.
  2. Don't mix tabs and spaces in indentation.
The first is enforced by the interpreter. Why would you want the programs indentation to not follow the programs logical structure?
The second isn't, but gets more support in Python 3 which is currently alpha testing.

- Paddy.


All times are GMT -5. The time now is 09:52 PM.