Why Templates?

Sebastián E. Peyrott as7cf at yahoo.com
Sat Mar 4 20:13:23 PST 2006


Well, I have no real experience with templates, either, but I do think there are
many interesting (and useful) coding techniques that require them. And even
though, I, for the most part, and as Derek, see them as a way of coding similar
algorithms based on different data-types, IMO the most important characteristic
is compile-time code generation. When to use it, and how to take advantage of
that feature, be it to create abstractions of similar algorithms based on
differing data-types, or not, is a whole other issue.
I'm not entirely sure whether there are other ways of achieving the same thing,
so   templates, for the most part, seem like an important feature for a language
such as D.

--
Sebastián.





More information about the Digitalmars-d mailing list