Le 01/12/2011 05:32, Abrahm a écrit :
"Jesse Phillips"<jessekphillip...@gmail.com>  wrote in message
news:jb6qfv$1kut$1...@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").


It means basically that many things are easier to do, AND, many thing that cannot be done in C++ metaprogramming can be done in D.

Your assertion about metaprogramming isn't quite true IMO. Template are a good thing and are usually overcomplicating stuff is C++. But the source of this complication is more C++ language itself than what metaprogramming is about. Making it easier to use IS a good thing.

Consider what auto, static if and compile time reflection can do for you when it comes to metaprogramming. This is amazing.

Reply via email to