* Win32 issues with Templates and Libs *
Walter Bright
newshound at digitalmars.com
Wed Feb 21 00:46:18 PST 2007
James Dennett wrote:
> Walter Bright wrote:
>> Pragma wrote:
>>> That raises an interesting question: seeing as how it's using the same
>>> backend, how does DMC handle this problem for C++?
>> Unlike D, a C++ compiler has no idea what templates are instantiated in
>> other files. So it instantiates everything. This is one reason why C++
>> builds are so much slower than D.
>
> It's fairly common for C++ compilers to use some kind
> of storage to record which templates are instantiated
> from which files, and has been for quite a few years.
Yeah, I've considered building such a thing. But it would be complex,
and the programmer would have to accommodate its idiosyncracies. Better
off fixing the language to support proper modules.
More information about the Digitalmars-d
mailing list