Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
How to handle errors in constructors without exceptions? (foonathan.net)
3 points by osopanda on Jan 19, 2017 | hide | past | favorite | 1 comment


There is an other approach. Don't use constructors at all. Back to good old init() and destroy() functions, and use valgrind with automated testing and coverage to ensure nothing gets lost. Delivered systems with zero downtime that way (7 years and counting last time I checked)




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

Search: