Is D more cryptic than C++?

dsimcha dsimcha at yahoo.com
Thu Dec 1 05:50:35 PST 2011


On 11/30/2011 11:32 PM, Abrahm wrote:
> "Jesse Phillips"<jessekphillips+d at gmail.com>  wrote in message
> news:jb6qfv$1kut$1 at digitalmars.com...
>> What bearophile was referring to was the use of templates is common.
>
> Are you sure about that? What say you Bear?
>
>> D's
>> templates have the advantage of being easier on the eyes and more
>> powerful (with the inclusion of 'static if' in the language).
>
> Having "come from" C++land, and knowing what some people do with it,
> making it EASIER to apply templates does not seem necessarily a good
> thing to me. (Ref: template metaprogramming). That said, does your
> statement above about D's template machinery being "powerful" etc., mean
> "it's easier to do template metaprogramming in D"? If so, I, personally,
> do not find that any asset at all (though I know some surely will, for
> there have been books written on that "abhorrence").
>

A lot of people from C++ backgrounds say this.  What they miss is that 
template metaprogramming in C++ is so ugly because the language wasn't 
designed for it.  In D you can do readable template metaprogramming.


More information about the Digitalmars-d mailing list