Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
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. :-)
-
Also, you have languages like PureScript that compile to an airtight, reasonable subset of JavaScript, those are very, very stable.
-
@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. -
@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.) -
It's not wise to use JavaScript in such critical task where lives depends on its functioning.
Let's just keep it simple
JavaScript for web application **only** no matter what everyone thinks. -
-vim-31686yLove so much language like Rust (currently learning it, looks so cool and fun to program with) and Swift that replaced all those null and undefined things with an enum that has to be unwrapped before being used
Rust example:
let g = Some(3)
let a = 2 + match g {
Some(int) => int,
None => 0,
};
//a is equal to 5, but if g was None, it wouldn’t crash
//can be compacted with other methods, but that’s the most basic way to handle it -
-vim-31686y@RememberMe There’s also WebAssembly, which is quite interesting for performance wise tasks like games, + the fact it’s not limited to web so that it could become a Java-like bytecode which is readable and available to a lot of systems
-
-vim-31686y@AdrianD But is it safe? No. You want a programming language that will generate the less errors possible.
-
-vim-31686y@AdrianD Because in Rust, you can try to compile something with None and handle it as normal, it won’t work. It forces you to solve common errors, and removes the need to check if a value is None.
“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”.
rant