SJS wrote:
(What I don't get are the people who do:
if (expression) {
code
}
...which seems the worst of all worlds.)
This actually makes a lot of sense, when you look at the syntax of the
language. Everything at the same indentation level as the "if" is
parallel with the "if". I.e., follow the "if" with an assignment, a
while loop, and then another assignment. The stuff in that column will
be "if", "assign", "while", "assign."
It makes a little more sense with something like Pascal, where the
delimiters are more "spelled out". It would be my preferred style if K&R
hadn't convinced so many other people to disregard syntax of the
language when picking indentation. (That, and switch statements never
make sense indentation-wise, in any language.)
What I've found hard is trying to explain scoping to people who's first
language was Python. "No, you _can't_ refer to that variable here, it's
out of scope!" "But it's at the same indentation level!"
That's exactly why it makes sense. :-)
And I've never been able to read python. I can puzzle my way through
many (real) languages, but in python, the scoping is impossible to keep
track of.
When scoping and lifetime differ, it can be confusing if you're not used
to it.
--
Darren New / San Diego, CA, USA (PST)
It's not feature creep if you put it
at the end and adjust the release date.
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg