On 19/10/10 7:00 PM, Walter Bright wrote:
Peter Alexander wrote:
== Quote from Walter Bright (newshou...@digitalmars.com)'s article
Passing a type to a function is conceptually no more difficult
than passing the
number 7.
Using templates is easy, even in C++. Writing them is the
conceptually difficult part for most people.
I think our experiences are wildly different!
I'm talking in general of course. Everyone knows how to use
std::vector<int>, it's just as easy as using a non-templated version
(say, std::vector_of_ints).
However, while many people would be fairly comfortable with writing
std::vector_of_ints, they would have a much harder time writing
std::vector<T>, and an ever harder time writing other containers in such
a way that allowed them all to interact with a standard interface
(iterators).