Project proposal
Benjamin Scherrey
scherrey@innoverse.com
Tue Jan 1 18:09:00 GMT 2002
1/1/2002 7:43:54 PM, Gabriel Dos Reis <gdr@codesourcery.com> wrote:
>"Jeffrey Turner" <jturner@mail.alum.rpi.edu> writes:
>
>| In light of my recent comments on the preprocessor
>| and in keeping with the spirit of C++
>
>I don't know what the spirit of C++ is. Please, could you elaborate
>on that? Thanks.
One of Stroustrup's tenets, along with "Don't pay for what you don't use.", is
that reliance on pre-processors shows the limitations of the language. He's right, even
though he freely admits that C++ still has such a reliance, albeit minimal, and is not likely
to ever get away from it. Basically he wants the language to symantically as well as
syntactically support the constructs that people have generally hacked via magic code
replacement/generation on the fly. Strong type checking and templates are two of the
key tools that make much of the previous (to those features) usage of the pre-processor
obsolete.
Having not looked at the specific header files in question, I'm not prepared to
declare judgement on the applicability to these specific examples of pre-processor
utilitzation. I will say that most pre-processor usage I encounter is better implemented via
the language features of C++, and with no size or runtime overhead costs.
regards,
Ben Scherrey
More information about the Gcc
mailing list