Hacker News new | ask | show | jobs
by w3pm 4834 days ago
C has the benefit that it's as close as you can get to a WYSIWYG language. There's no VM or garbage handler running behind your back doing god-knows-what at the most inopportune time. You can look at the code and know exactly what instructions it's going to execute, every time.

(Yes the compiler can do some trickery at certain optimization levels but even then, you're able to look at the generated assembly very easily and verify the output you expect to see).

I'm a little surprised they aren't running their own OS with a custom scheduler; I guess the odds of that being bug free vs the odds of running into a Linux bug make it a losing proposition.

3 comments

Ada has had hard realtime support since Ada 95.

Also, the idea that C or even Assembler creates guarantees of stability and predictability is contingent on the CPU design.

But now I am at the limits of my shallow pool of knowledge. The SpaceX stuff demonstrably works; Carmack has done fast control systems in C/C++ and it works. I'm probably making an unnecessary fuss.

GA144, from Green Arrays, is a chip which is very good for space applications - computational power, energy efficiency, predictability, versatility, radiation tolerance... Yet after a year and a half on the market there is still no sensible C compiler for it.

I doubt "C is as close as you can get to WYSIWYG" is always entirely correct.

> You can look at the code and know exactly what instructions it's going to execute, every time.

Unless you are talking about embedded processors or old 8 and 16 bit processors, this is no longer true in modern architectures.

That's why they DONT use "modern architectures" in space missions.