Why Templates?

Derek Parnell derek at psych.ward
Sat Mar 4 15:40:53 PST 2006


I'm sure its because I'm not from a C++ background, but I just don't get  
templates. What is the problem that Templates solve?

 From my limited experience they just seem to be a shorthand for a way of  
avoiding coding identical algorithms that only vary in the datatypes that  
are passed to them. Is that it or am I missing some fundamental elements?

And is that why people are clamoring for implicit template instantation -  
to further reduce the amount of typing to do (and remembering to  
instantiate the only the required renditions of the algorithm).

-- 
Derek Parnell
Melbourne, Australia



More information about the Digitalmars-d mailing list