home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!taumet!steve
- From: steve@taumet.com (Steve Clamage)
- Subject: Re: Idempotent header file proposal
- Message-ID: <1992Nov22.173734.2042@taumet.com>
- Organization: TauMetric Corporation
- References: <1992Nov19.090742.23696@cbfsb.cb.att.com> <1992Nov20.010009.24900@taumet.com> <1992Nov21.175456.119915@Cookie.secapl.com>
- Date: Sun, 22 Nov 1992 17:37:34 GMT
- Lines: 50
-
- frank@Cookie.secapl.com (Frank Adams) writes:
-
- >In article <1992Nov20.010009.24900@taumet.com> steve@taumet.com (Steve Clamage) writes:
- >>nh@cbnewsg.cb.att.com (nicholas.hounsome) writes:
- >>>Can we not have a standard pragma to say that a header file is idempotent
- >>
- >>This solves a problem outside the language, and for that reason is
- >>probably not appropriate to put in the language Standard. [...]
-
- >This is a generic problem; it
- >does *not* apply only to some systems. So a standard is appropriate; but if
- >it is neither to be a language standard nor a standard pragma, how is it to
- >be done?
-
- Some compilers are very slow. How about a standard pragma "#pragma fast"
- which would direct the compiler to compile more quickly if it could.
- Some compilers require too much memory at compile time. How about a
- standard pragma "#pragma small" which would direct the compiler to use
- less memory if it could. If the compiler could not comply, it would
- ignore these pragmas.
-
- I hope these suggestions sound silly to you. These, along with the
- repeated include file problem, are not C++ (or C) language problems.
- They are "quality of implemenation" issues.
-
- Please note I am not saying that an implementation should not provide
- pragmas (or command-line flags) to cater to specific features of the compiler
- or runtime system (including "fast", "small", or "once" pragmas). I am
- saying that these are not issues for the language specification to address.
-
- [Perhaps we have a slight communication problem. When I use the word
- "standard", I mean in the sense of an agreed-upon language specification.
- For C, this means the ANSI/ISO C Standard. For C++, it currently means
- the ARM, and will eventually mean the ANSI/ISO C++ Standard. I don't
- use the word "standard" to mean merely "popular".]
-
- As Jim Adcock has noted in another posting, compilers exist which address
- the include file problem without requiring source code modification.
- Precompiled headers and incremental compilation are two ways existing
- compilers avoid entirely the problem you are trying to fix with a language
- extension. Other solutions are also possible.
-
- If your compiler is too slow or uses too much memory, get another one
- which better suits your needs, or lobby your vendor to make improvements.
- If your compiler doesn't deal intelligently with repeated includes,
- take similar measures.
- --
-
- Steve Clamage, TauMetric Corp, steve@taumet.com
- Vice Chair, ANSI C++ Committee, X3J16
-