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
[ Parent
| on HN ]
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.
> 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.