begin  quoting Darren New as of Wed, Jan 02, 2008 at 09:17:45PM -0800:
> 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.

I disagree.

>           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."

Didn't say that there wasn't a justification.

> 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.)

My indentation style in pascal is different than what it was in C.

> >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. :-)

Again, I disagree. :-P

> >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.

Which just goes to show that nothing is intuitive.

-- 
We need a good representation for state machines
The current approaches are worth a hill of beans.
Stewart Stremler

-- 
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to