Comparison chart of D and C++ templates

Marcin Kuszczak aarti at interia.pl
Fri Jan 19 12:59:33 PST 2007


Walter Bright wrote:

>> This table also makes some things clear that would be nice to have in D.
>> The ones that jump out at me are templated constructors and overloading
>> templated functions with other functions.
> 
> Templated constructors, yes, 

Great!

> but the overloading thing is unnecessary 
> and makes things more complicated than needed.

I would say it is bad news - calling special degenerated function to
overload templated function is really unintuitive and probably every
newcomer will fight with this.

See my problems with that:
http://www.digitalmars.com/d/archives/digitalmars/D/learn/Is_it_a_compiler_bug_5478.html

and 
http://www.digitalmars.com/d/archives/digitalmars/D/bugs/Issue_798_New_Template_function_overloading_problems_9873.html

Additionally solutions with dummy template parameters are just ugly...

-- 
Regards
Marcin Kuszczak (Aarti_pl)
-------------------------------------
Ask me why I believe in Jesus - http://zapytaj.dlajezusa.pl (en/pl)
Doost (port of few Boost libraries) - http://www.dsource.org/projects/doost/
-------------------------------------




More information about the Digitalmars-d-announce mailing list