News for hackers. Stuff that matters.
Re:T* makes for a poor optional<T&> by Pxtl on Monday December 13, 2021 @09:47PM (#29547607)
I cut my teeth on Python's "forgiveness not permission" model and find that exceptions are usually the cleanest model since so few languages have pleasant syntax for alternate return-types, and returning a status code and using out parameters for the actual result is miserable.
Re:T* makes for a poor optional<T&> by masklinn on Tuesday December 14, 2021 @12:28AM (#29548556)
Sure but python was built on a model of signalling anything via exceptions, C++ was not, and it sacrifices the exceptional case for the benefit of the nom-exceptional one.