News for hackers. Stuff that matters.
Re:Investigating the Performance Overhead of C++ Exceptions by klingonopera on Tuesday February 11, 2020 @04:56PM (#22303339)
ZeroMQ's author has written a wonderful article about how he should've picked C in place of C++ in a mission-critical setting, even despite personally preferring C++ himself.

http://250bpm.com/blog:4

Re:Investigating the Performance Overhead of C++ Exceptions by Fredej on Wednesday February 12, 2020 @04:38AM (#22307364)
This is an interesting post, definitely! However, as it was posted in 2012 I feel like some of his concerns have been addressed in newer versions of C++.

Instead of having a Constructor + init method you could have a static create function which returns an optional or a pair.

I have a hard time seeing in what case you would want to throw in a destructor though? Maybe I'm just writing a different kind of code :)

Re:Investigating the Performance Overhead of C++ Exceptions by TeMPOraL on Wednesday February 12, 2020 @04:51AM (#22307452)
> I have a hard time seeing in what case you would want to throw in a destructor though? Maybe I'm just writing a different kind of code :)

I can't imagine that case either - but what I can imagine is that your destructor calls a function that calls a function ... that calls a function you didn't realize can throw.

Re:Investigating the Performance Overhead of C++ Exceptions by sitkack on Tuesday February 11, 2020 @09:11PM (#22305123)
I really enjoy examples of analysis contravening ones opinions. We rationalize far too often.