Walter Bright wrote:
D (constraints) + (static if) + (pragma msg) can do everything that Concepts do but one thing - checking of the template body against the constraint. My opinion is the latter is of low importance.
I have somehow the idea that D constraints and template specialization should merge. Guess what I want to say is that instead of accepting the compiler decision for template specialization a constraints could be used for : "I am not the one who is able to fulfill your needs.. try this template instead."
template Foo(int N) if ( ( N & 1 _else_ FooOdd!(int N)... ) ) // or pattern matching { ... } //not the world's best example, but guess it is showing the intention. -- NO constraint, let Mr compiler decide which template fits. (old behavior)