Should binary sharing be done using Mixin Template?

bearophile bearophileHUGS at lycos.com
Sat May 21 05:49:16 PDT 2011


Matthew Ong:

> Should D be able to do binary sharing when the same template is being 
> used for different data type.

There is no a single silver bullet to reduce template bloat and its negative effects. So this problem need to be faced from many different directions at the same time. One of the directions is the one you talk about. I am thinking about some class/struct/function annotation to ask the D compiler to use something closer to generics with auto boxing-unboxing for that class/function. It's useful in the spots where the full performance of templates is not needed (this happens in programs).

Bye,
bearophile


More information about the Digitalmars-d mailing list