OT: on IDEs and code writing on steroids

Frits van Bommel fvbommel at REMwOVExCAPSs.nl
Wed May 20 02:16:33 PDT 2009


Kagamin wrote:
> BCS Wrote:
> 
>> smaller object code? OTOH a good implementation will noice when I can fold 
>> together several template expansions
> 
> That's the difference. You can't fold templates because they're binary incompatible as opposite to generics.

They're not always binary-incompatible. For instance, if a template only works 
with pointers or references (this includes object references) to parameter types 
it might well contain the exact same machine code for some of the instantiations.
A compiler backend or linker could recognize these cases and use a single 
instantiation's machine code for them.
(Essentially, these are pretty much the same cases where generics would have 
been sufficient)



More information about the Digitalmars-d mailing list