4 ms·
I'm sure it varies from one group to the other. This CppCon talk from 2014 says no exceptions are permitted in mars rover flight software. https://github.com/
by thedance 7y ago
I'm sure it varies from one group to the other. This CppCon talk from 2014 says no exceptions are permitted in mars rover flight software.
https://github.com/CppCon/CppCon2014/blob/master/Presentations/C%2B%2B%20on%20Mars%20-%20Incorporating%20C%2B%2B%20into%20Mars%20Rover%20Flight%20Software/C%2B%2B%20On%20Mars%20-%20Mark%20Maimone%20-%20CppCon%202014.pdf https://github.com/CppCon/CppCon2014/blob/master/Presentatio...
- TeMPOraL 7y agoYeah, but the slides don't give a reason why; the only hint is a prior slide mentioning the "historic arguments against using C++ in flight", namely "Exceptions: too much uncertainty, difficult to validate all possible control paths". And that has nothing to do with performance.
- klingonopera 7y agoZeroMQ'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 http://250bpm.com/blog:4
- sitkack 7y agoI really enjoy examples of analysis contravening ones opinions. We rationalize far too often.
- Fredej 7y agoThis 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 :)
- TeMPOraL 7y ago> 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.
- humanrebar 7y agoWell, mission critical software has to meet latency requirements, but it has to do so in a way that's provably bounded. In some ways, it's actually worth being a little slower if it's easier to prove you meet latency requirements. Point being it's not entirely orthogonal to "performance".