Hacker News new | ask | show | jobs
by int_19h 1364 days ago
In a language like C++ returning status codes means that callers can and will ignore it, even when they shouldn't.
1 comments

Since C++17, using [[nodiscard]] can help with that.
Indeed, Google's implementation of Status/StatusOr requires explicit handling of those objects, they cannot be discarded automatically.