Re: speeding up compile times in C++

tmb@netcom.com (Thomas Breuel)
Sun, 12 Feb 1995 10:11:34 GMT

          From comp.compilers

Related articles
[4 earlier articles]
Re: speeding up compile times in C++ glasss@ncp.gpt.co.uk (Steve Glass) (1995-02-03)
Re: speeding up compile times in C++ thutt@clark.net (1995-02-04)
Re: speeding up compile times in C++ rfg@rahul.net (Ronald F. Guilmette) (1995-02-04)
Re: speeding up compile times in C++ imp@boulder.openware.com (1995-02-06)
Re: speeding up compile times in C++ green@vizbiz.com (Anthony T. Green) (1995-02-06)
Re: speeding up compile times in C++ shankar@sgi.com (1995-02-08)
Re: speeding up compile times in C++ tmb@netcom.com (1995-02-12)
| List of all articles for this month |
Newsgroups: comp.compilers
From: tmb@netcom.com (Thomas Breuel)
Keywords: C++, performance
Organization: NETCOM On-line services
References: 95-02-012 95-02-094
Date: Sun, 12 Feb 1995 10:11:34 GMT

shankar@sgi.com (Shankar Unni) writes:


        [C++ precompiled header files]


        - one precompiled header per source header. This causes enormous
            headaches, especially with inter-header dependencies (macros are a
            *BEAR*, as are redeclarations of tags, since most parsers simply swallow
            them silently leaving no trace behind).


What is so frustrating about this is that the C++ committee had it in
their power to define C++ in such a way that separate compilation
(including precompilation of header files and definitions) would have
been possible.


How? By providing language based (rather than preprocessor based)
mechanisms for defining and using interfaces (#include) and for
conditional compilation (#ifdef). The technology for this is
well-understood and pretty simple.


That way, new code could have used the language based facilities
exclusively and allowed efficient separate compilation. Only
old code that still used the old mechanisms would have had to
forgo true separate compilation.


Such facilities could also have enhanced type safety and eliminated
some of the chores of keeping header files and implementations in
sync.


But that opportunity was missed. Apparently, features like member
function pointers and multiple inheritance were more fun to work on...


Thomas.
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.