Hacker News new | past | comments | ask | show | jobs | submit login

Never before has "try { ... } catch (e) { ... }" been so important



Actually my understanding from talking to their first software developer is that their systems are written in C++ and they do not use exceptions. Ever.

If that surprises you, consider that the default behavior of an uncaught exception, anywhere in your code, no matter how minor, is to crash your program. While you're in flight, the last thing that you want to see is a software crash. Having software encounter an unanticipated state might or might not destroy the rocket. Having your control system spontaneously cut out in flight definitely will destroy the rocket.


This is incorrect. In avionics software, you want software that self-detects its own failure to quit immediately, and engage the backup system.

You do NOT want it to "soldier on" once it has entered an unknown state.

The general problem with error codes is they can be so easily ignored, and then the software is operating in an unknown and untested state.

I suspect the actual reason why they eschewed exceptions is because exceptions may not be able to guarantee hard realtime latency.


I've actually considered getting into aerospace software development. It sounds awesome --- after all, you're writing software for devices that leave the planet! --- but what's given me pause is that the software creation process itself is so necessarily conservative that I'm afraid the process would strip all the joy out of the actual coding.


(Although to be fair, I sincerely doubt Falcon 9 is running javascript)


That could also be Java.


Because waiting on garbage collection is definitely what you'd want in a rocket.


Judging from the debris on the video, they didn't collect their garbage.


And never will. As if "try/catch" was involved the rocket would've just failed, rather than "continue/resume".




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: