Comparison chart of D and C++ templates

Bruno Medeiros brunodomedeiros+spam at com.gmail
Sat Jan 20 04:02:34 PST 2007


Walter Bright wrote:
> Walter Bright wrote:
>> http://www.digitalmars.com/d/template-comparison.html
>>
>> Comments?
> 
> Posted updated version based on comments so far.

What does it mean, the "Pointer Parameters - Yes, a pointer to object or 
function" or "it has delegates, which can be used as parameters"?
Isn't that saying that pointers and delegates can be used as (value) 
template parameters in D? But that is not the case.

In "Member templates parseable without hints", Foo.bar in the D code is 
a non-definition function declaration, right? Perhaps (just a minor 
nitpick) we could use an actual definition:
     Foo bar!(int I){ ... };
  since non-definition declaration are not normal D idioms, unlike in C++.

BTW, this comparison is very good, unlike the previous one about general 
language features. It shows how easy it is to use each feature (if 
available at all), which is what the programmer wants to know, which is 
what a comparison should show, which in turn most of the time cannot be 
fully expressed simply with just "Yes|No" remarks. That was a major 
point of "failure" of the previous comparison table, IMO, it was too 
fixed in a "has or has not explicit feature X" instead of "how easy it 
is to do Z".

-- 
Bruno Medeiros - MSc in CS/E student
http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D



More information about the Digitalmars-d-announce mailing list