What's wrong with D's templates?

Walter Bright newshound1 at digitalmars.com
Mon Dec 21 19:15:04 PST 2009


Yigal Chripun wrote:
> But that doesn't mean the idea itself isn't valid. Perhaps a different 
> language with different goals in mind can provide a much simpler non 
> convoluted implementation and semantics for the same idea?
> You've shown in the past that you're willing to break backward 
> compatibility in the name of progress and experiment with new ideas. You 
> can make decisions that the C++ committee will never approve.
> 
> Doesn't that mean that this is at least worth a shot?

I believe that D's template constraint feature fills the bill, it does 
everything Concepts purported to do, and more, in a simple and easily 
explained manner, except check the template body against the constraint.

The latter is, in my not-so-humble opinion, a desirable feature but its 
desirability is overwhelmed by the payment in complexity and 
constrictions on the Concepts necessary to make it work.



More information about the Digitalmars-d mailing list