On 7/23/2015 6:05 PM, H. S. Teoh via Digitalmars-d wrote:
It doesn't solve *all* the problems, but it does solve a
significant subset of them.

The worst case of not having this feature is a compile time error. Not a runtime error, undetectable error, or silent corruption. A compile time error.

I also believe that you underestimate the nuisance significance of requiring the constraints cover 100% of everything the template body does.

Experience with something similar is with exception specifications. Even advocates of ES found themselves writing obviously crap code to work around the issue, because ES was so damned annoying.

I know a lot of the programming community is sold on exclusive constraints (C++ concepts, Rust traits) rather than inclusive ones (D constraints). What I don't see is a lot of experience actually using them long term. They may not turn out so well, like ES.

Reply via email to