Should binary sharing be done using Mixin Template?

Paulo Pinto pjmlp at progtools.org
Tue May 24 05:15:06 PDT 2011


On 21.05.2011 13:03, Jonathan M Davis wrote:
>
> Templates are completely different from generics. Generics are compile-time
> artifacts only and have no effect on the final binary. Templates, on the other
> hand, are generated for each type that they're instantiated with.

Only if you are speaking about Java. In Eiffel, Ada, Modula-3 Ocaml, 
Haskell, and .Net generics are also handled like C++ templates.

They just don't allow the same type of metaprogramming tricks that C++ 
does, although Template Haskell does allow neat tricks as well.

--
Paulo


More information about the Digitalmars-d mailing list