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

Modern C++ is still a safety-third design.

std::optional is relatively new, and supports dereferencing, which when it’s empty is UB instead of an abort.

There are no plans to add checks to any existing APIs, because “it didn’t have a branch before” is also considered a compatibility issue.




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

Search: