help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can GCC guess where to find template definitions?


From: Paul Pluzhnikov
Subject: Re: Can GCC guess where to find template definitions?
Date: Sat, 16 Apr 2005 07:52:40 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Jumbo Shrimp, linux)

James Kanze <kanze@none> writes:

> Why g++ never implemented this, I'll never know, given that it
> is pretty much standard practice in the world where g++ is most
> used.

It is not at all a *standard* practice, though it is used by Sun,
SGI and IBM compilers.

However, under certain usage scenarios all of the above compilers
"break" (as in unable to link otherwise well-formed program),
and debugging the reasons why they break is extremely painful (as
is debugging any tool that thinks it is smarter then the programmer
that is using it).

They also wreak complete havoc on automatic dependency detection
tools, such as ClearCase make.

IMHO, letting the programmer control exactly what is compiled when
via explicit source modification is a much better option.

> Dixit certain implementers (Microsoft?).  The few people I know
> who have actually used export say only good things about it.
> It's not a miracle worker, but it does improve encapsulation and
> compile times.

They probably could have used a whole lot of other, much more
portable techniques and achieved better compile-time speedup and
better encapsulation. One of the definitive books on the subject is
"Large-Scale C++ Software Design" by John Lakos

Cheers,
-- 
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]