“Any application that can be written in JavaScript, will eventually be written in JavaScript.” — Jeff Atwood

Fast-forward 20 years, a plane crashes, they find and open the black box and in the flight logs they can see the cause clearly: ”undefined is not a function”.

  • 15
    I doubt that JS (and PHP) hackers even know what DO-178 is. Failing to fulfill that means you won't get the software on an aircraft in the first place. :-)
  • 3
    @Fast-Nop you made me go check. Now i know, thanks :)
  • 4
    @Fast-Nop In Europe, we call DO-178B ED-12B, just for those people who want to look it up.
  • 3
    Also, you have languages like PureScript that compile to an airtight, reasonable subset of JavaScript, those are very, very stable.
  • 3
    @RememberMe The main issue is that JS is usually executed in some interpreter (e.g. a browser) on top of an OS like Linux. You'll never get any of them certified for critical things because already DO-178 level C software requires code coverage and manual explanation for lines not covered. This is not feasible for the millions LOC for the Linux kernel alone. Any update requires the whole thing again.

    That leaves level D and E software, which is for systems where there is either no impact at all or just a minor inconvenience. So, harmless stuff like inflight entertainment, or ground service maintenance racks.
  • 3
    @Fast-Nop agreed, but the massive complexity of JavaScript engines is because of the extremely aggressive performance optimisations they have to do, right, and because of how free JS is as a language.

    So theoretically, if you use a restricted, well-formed, and sane subset of JavaScript (like asm.js), a JavaScript engine that doesn't aggressively go for performance and goes for soft (or hard) realtime and is checkable via formal proof, and runs on something like Integrity or VxWorks, then it could be done, right?

    I don't know enough about JS to say whether it's even possible to make it hard realtime, but I'm assuming that as long as you remove its traditional web dependencies, it's possible.

    (It would be absolutely pointless, but eh.)
Your Job Suck?
Get a Better Job
Add Comment