Why Templates?

Lars Ivar Igesund larsivar at igesund.net
Sun Mar 5 06:49:17 PST 2006


Hasan Aljudy wrote:

> Ivan Senji wrote:
>> Hasan Aljudy wrote:
>> 
>>> I feel the same.
>>> I do come from C++ background, but I just hate templates! (Now I hate
>>> C++ itself :)
>>> I think templates were introduced in C++ to solve the "no-base-class"
>>> problem.
>> 
>> 
>> It is the other way around, languages introduce common base class to
>> solve the no-templates-problem. (Not a very good solution IMO).
>> 
> 
> No. The Object base class fits perfectly into the object oriented
> paradigm. Templates do not, hence a hack.
> 
>>> In other words, it's a hack that solves a misfeature in C++.
>>>
>>> D's templates are not really templates any more, they're more like a
>>> meta-programming facility. Or so I think, anyway. I don't really
>>> understand templates anyway, not to mention meta programming
>>>

Luckily there is much more to programming than just OOP. :)



More information about the Digitalmars-d mailing list