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

Reply via email to