From: Rando Christensen Date: 2004-08-21T22:10:22+09:00 Subject: Re: This naughty language of ours violates hallowed Structure Programming sophistries > Before Object Oriented Programming, people who studied the difference > between cruft and maintainable code learned to improve things by linking > control flow to variable scope. An example in C: > > if (whatever()) > { > int x = something(); > somethingElse(x); > } > x; /* this line won't compile, unless another x is available from > above */ I've always believed that the key principle behind coding with scope in mind is not how the scope is implemented so much as understanding the rules of variable scope for the language and using them to write solid code that is not as prone to errors. Remember, a bad programmer will write bad programs in any language, and a good programmer will write good programs in any language (given sufficient time to understand the language). Any rules that the language enforces, whether for scoping or for language structure or whatever, do not alter this. -- Rando Christensen