[Tutor] Losing the expressiveness ofC'sfor-statement?/RESENDwith example

Smith, Jeff jsmith at medplus.com
Fri Aug 10 16:07:31 CEST 2007

From: tutor-bounces at python.org [mailto:tutor-bounces at python.org] On
Behalf Of Kent Johnson

Stephen McInerney wrote:
>> The C for-loop syntax itself is not error-prone at all.
>> Unless you mean off-by-one errors etc., missing initializations, and 
>> those are mostly semantic not syntax-related.

> Yeah other than that it isn't error-prone at all.

This distinction is, unfortunately, lost on most programmers.  When
there is a bug in the code that needs to be tracked down and resolved,
it doesn't really matter much whether it is the fault of the compiler,
or the language sytnax which drives a programmer to make mistakes.
Quibbling about this doesn't make these errors magically disappear.
IMHO, a language being syntactically error prone is far worse since
there's no way for the vendor to "fix" that one!


P.S. This should in no way be construed as undercutting my belief that
Python should have a case statement, a ternary operator, and
full-fledged lambdas...sometimes the risk of syntactic errors is
overcome by a construct's logically expressive usefulness...but that's
grist for another mill :-)

More information about the Tutor mailing list