Silly brackets (Was: Re: Problems extending Python with C.)
François Pinard
pinard at iro.umontreal.ca
Sun Feb 20 12:18:09 EST 2000
"Martin v. Loewis" <martin at loewis.home.cs.tu-berlin.de> writes:
> > 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.
> One of the problems is that C uses a preprocessor, which often does funny
> things to indentation, making the notion of column number meaningless to
> preprocessor output. Combine this with the common approach of implementing
> the preprocessor as a separate process, and you'll see that what you
> want is very hard to implement.
I would not think it is a problem, as #define's all expand into one line,
and there is nothing to report about brackets which match on the same line.
Could you provide an example of pre-processor breaking user indentation?
> That, of course, says nothing whether it would be desirable to have
> such a feature. I'm quite certain that you'd get *a lot* of warnings
> for most of today's code.
Not mine! :-). Many people like to write neatly, you might be surprised.
Others do not have to use that feature, if they do not feel like it.
--
François Pinard http://www.iro.umontreal.ca/~pinard
More information about the Python-list
mailing list