This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Project proposal
- From: Benjamin Scherrey <scherrey at innoverse dot com>
- To: Gabriel Dos Reis <gdr at codesourcery dot com>, gcc at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org
- Date: Tue, 01 Jan 2002 21:07:26 -0500
- Subject: Re: Project proposal
- Bcc: scherrey at innoverse dot com
- Organization: Innoverse, Inc.
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