News for hackers. Stuff that matters.
Re:Go 2 Draft Designs by naasking on Tuesday August 28, 2018 @04:45PM (#17862700)
> The reason STL errors are so convoluted is largely due to the unintuitive and complicated way they use generics to support obscure features like changing the allocator used by containers.

The reason STL errors are so convoluted is because the C++ template language is Turing complete.

Re:Go 2 Draft Designs by jcelerier on Tuesday August 28, 2018 @07:19PM (#17863806)
no, it's because every function is implemented with a dozen helper function so compiler error stack traces have to show all the intermediate, generally return-only, helper functions
Re:Go 2 Draft Designs by pjmlp on Wednesday August 29, 2018 @03:30AM (#17866389)
True if we are speaking about C++11 and earlier.

With C++14 onwards, it is a matter of developers actually making use of static_assert, constexpr if and enable_if.

Not as comfortable as just using concepts, but they get the job done.

Re:Go 2 Draft Designs by naasking on Wednesday August 29, 2018 @08:19AM (#17867626)
> no, it's because every function is implemented with a dozen helper function

Which are needed and/or allowed for reuse because the template language is Turing complete. More restrictive type-level languages have better error messages because the compiler either understands what you're intending to do or you're limited in the things you can express, full stop.