Hacker News new | ask | show | jobs
by stingraycharles 4071 days ago
Correct me if I'm wrong, but isn't the whole infrastructure for concepts already there using TMP? The c++ std library even uses some of them already (for example, when using a set it requires an type with operator<, in other words, similar to Haskell's Ord type).

To me it feels as if c++17 is just making the compiler more aware of them, and as a result likely produce better error messages (and the code to write them to be more pleasant).

1 comments

Concepts are significantly simpler to implement & check. I did a non-trivial amount of coding both with TMP-concepts, and with ConceptGCC. ConceptGCC produced better error messages earlier, was easier to symbolically debug, and produced better text, all with less & easier to read & understand code.