4 ms·
Quite frankly, I still don't get it. Concepts are a big, complex feature and the main thing you get out of them is that it makes it easier to write error-checki
by slavik81 11y ago
Quite frankly, I still don't get it. Concepts are a big, complex feature and the main thing you get out of them is that it makes it easier to write error-checking for template parameters. I don't think I've ever actually been bitten by that problem in the first place.
I was champing at the bit to get C++11 features like auto, move, lambdas, unique_ptr, bind and random. I could see exactly where I'd use them to make my code simpler.
The C++17 proposals mostly are uninspiring in comparison. Some seem minimally useful while others seem very complicated. I worry that we might end up standardizing a bunch of useless or poorly considered features.
- srean 11y ago>I don't think I've ever actually been bitten by that problem in the first place. That I think qualifies you to be a few of a kind if not one of a kind. If you use a lot of templates and manage to avoid the problem of 'late errors' with a reasonable effort I would love to know more about your programming style
- slavik81 11y agoI suppose I probably have been bitten by this sort of thing when using iostreams and Google Mock.
- mike_hearn 11y agoI think everyone who programs in C++ has had their terminal scrollback buffer be wiped by a giant and entirely useless error message from the compiler due to some template substitution error. Even if you don't define templated types yourself (very common), you will use them all the time, and if concepts lead to better error messages, then it'd be a win for everyone who uses libraries like the STL or Boost.