News for hackers. Stuff that matters.
Re:Functional exceptionless error-handling with optional and... by smaddox on Sunday December 03, 2017 @07:30PM (#15840565)
How are exceptions in C++ any more zero-cost than Option or Result in Rust? There must still be a branch operation in the code that C++ generates, or it wouldn't be able to handle the exception.
Re:Functional exceptionless error-handling with optional and... by kindfellow92 on Sunday December 03, 2017 @07:43PM (#15840624)
In C++ there is at most only one compare (presumably at the spot where the exception was detected). In Rust there is a compare all the way up the stack after every function call site, and it is executed if an error happens or not.