Silly brackets (Was: Re: Problems extending Python with C.)
François Pinard
pinard at iro.umontreal.ca
Sat Feb 19 23:24:34 EST 2000
sk at nvg.unit.no (Steinar Knutsen) writes:
> The problem described below was caused by my misplacing a bracket in
> the C-part of the code. As my Python-trained brain only looked at the
> indentation, the error was easily missed. Remind me to flame the next
> guy who claims indentation is brittle and brackets are robust. :)
I believed, for years, that C compilers should have an option to emit
warning diagnostics when indentation is not consistent with brackets.
It is a big waste, in my opinion, that compilers ignore all that redundancy,
while it could be used to better help programmers.
P.S. - Copy sent to bug-gcc, in hope someone in there will agree :-).
I tried to convince Richard a few times in the past years, and suggested
various heuristics, but I probably did not succeed at raising his interest.
--
François Pinard http://www.iro.umontreal.ca/~pinard
More information about the Python-list
mailing list