Hacker News new | past | comments | ask | show | jobs | submit login

But then you loose so many features of C++. Can't have aggregates anymore since everything needs private constructors -> more code -> more bugs.

Each possible contructor now needs a matching static method.

Can't put things in standard containers unless you rewrite all copy / move contructors (and you didn't forget to mark your move constructor noexcept, did you ?).

What happens when you have classes with more than 3 members ? Constructors with 12 arguments ? That's unambiguously terrible, and does not even save you from exceptions coming from C++ itself.

If 79% of surveyed C++ projects can use exceptions (https://www.jetbrains.com/lp/devecosystem-2020/cpp/), likely so can you.




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

Search: