Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
C++: Uniform initialization isn’t (medium.com/barryrevzin)
2 points by ingve on Sept 11, 2017 | hide | past | favorite | 1 comment


TLDR: Letting the compiler figure out both types (with template argument deduction) and constructors (with brace initialization) is a bad idea, causing embarrassing type errors in common, practical cases. Either or both sides should be explicit.

There are some good points, particularly about messy exceptions to messy type deduction rules, but I'm deeply irritated by the willingness to bend the language specification, or at least coding guidelines, to care for developers who don't bother to read code or documentation and hope to guess constructors successfully.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: