News for hackers. Stuff that matters.
Re:When noexcept? by vog on Thursday December 15, 2016 @09:57AM (#13184960)
I couldn't agree more!

When I first used Qt, I wondered how such a large framework could get along without exceptions. After writing some non-trivial Qt programs, I still noticed that there is really no need for exceptions, except when interfacing non-Qt libraries, where I simply caught and handled the exceptions in a small wrapper.

Finally, I got it: Qt uses the Null-Object pattern (not to be confused with Null values!) consistently, which is really in almost all cases the more elegant solution:

https://en.wikipedia.org/wiki/Null_Object_pattern

Re:When noexcept? by blub on Thursday December 15, 2016 @11:43AM (#13185877)
Null object is not bad, but std::optional has clearer semantics and is probably safer.

This is probably the only sane alternative to exceptions - optional types and result<T, E> types.