4 ms·
Is it really the case that some programming languages are more resilient to hardware errors than others? Java does array bounds checking in principle, but it i
by ealloc 11y ago
Is it really the case that some programming languages are more resilient to hardware errors than others?
Java does array bounds checking in principle, but it is usually optimized out of the machine code. Isn't it then virtually just as susceptible to hardware error as C? And the JVM is written in C anyway.
- kazinator 11y agoThis has been the subject of some papers, like https://www.cs.princeton.edu/~appel/papers/memerr.pdf https://www.cs.princeton.edu/~appel/papers/memerr.pdf [2003]
- lmm 11y agoThe JVM is written in C, but that C has been subject to some formal analysis. And even if it hadn't, I'd bet the defect rate of a Java program running on a C JVM would be much much lower than that of a C program.
- kazinator 11y agoBut, in keeping with this topic, that C has not been subject to formal analysis from the angle of defending against rays doing random things to the CPU and RAM or other hardware errors.
- unscaled 11y agoSo let's stop unit testing all of our code, since it's provably incorrect anyways, due to cosmic rays flipping random bits of RAM once in every gazillion calculations.
- pjmlp 11y ago> And the JVM is written in C anyway. Which one? https://en.wikipedia.org/wiki/List_of_Java_virtual_machines https://en.wikipedia.org/wiki/List_of_Java_virtual_machines Depending which one we are speaking about, they are implemented in Assembly, C, C++ or even Java.