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 was told at one time the legal agreement for Java states you cannot use it for safety critical things such as flight control or nuclear reactors.
-
Coming from the sector, autopilot software must be real time software for obvious reasons. Java can not be used for realtime software for various reasons. So c++ or even c is enough, with rigorous tests.
-
iAmNaN68456yThe advantage of Ada is that it is designed to prevent runtime errors, and makes it really difficult to create buggy code. As much as I disliked using it, it is a great language for stable, bug free systems.
-
@iAmNaN of course Ada makes it difficult to create buggy code - but only by making it difficult to create any runnable code at all.
@aviophile C is even better here because it ensures that people don't use C++. -
iAmNaN68456y@Fast-Nop well, yes. 🙃 We used to take our requirements and implement them in C++, because they were for training systems, and then apply for a waiver, stating that the work had already been completed. Always got the waiver. But for criticsl systems, where a runtime failure is not an option, the extra time it takes to do it in Ada is worth it. Don't want the guidance system to land the package on the wrong coordinates.
-
@aviophile Java can run real-time if it's the only thing running :D ...meaning that there is no JVM because the thing running it executes bytecode directly
Examples: iButton, debit cards, DVB decoders(the decoder cards look pretty similar to debit cards - well it turns out they run java too) , SIM cards... -
@bytecode
True. Java can run in real-time. Problem is, when you're a Java app(let), you are at the mercy of the JVM. I have extensive experience writing code for JCOP, and it has its weird quirks and bugs; not to mention because it's fucking Java you don't have the blessing of malloc() -
@bytecode even c with dynamic memory can not be hard real time. In C, heap is optional but in Java, it is only heap iirc.
-
@aviophile I'm using static allocation anyway so that no runtime issues like out of memory, memory fragmentation or unpredictable runtime can occur. Even the stack size needs to be thoroughly analysed so that it won't overflow.
Related Rants
Would you trust an aircraft autopilot written in Java, or would you prefer C++?
question
c++
java
rant