2 ms·
Rust is very low level. When I looked at Go (I haven't really learned it beside some simple things), it seemed the most Ada like of languages I've looked at.
by acomjean 5y ago
Rust is very low level. When I looked at Go (I haven't really learned it beside some simple things), it seemed the most Ada like of languages I've looked at. I'm not sure how safe it is, but considering some of these govt. projects were moving to c++ from Ada, it might be reliable enough.
> the space station was done in long, sleepless 'power-coding' binges
Yikes.
I grew to appreciate Ada. We would disable the interupts on some cpus and the software had to be reliable as if the code crashed or got stuck, you were rebooting the machine.
- stouset 5y agoI would be very, very surprised to see Go in this space and not at all surprised to see Rust. Go has a garbage collector, which fundamentally introduces nondeterminism. Due to implicit interfaces, it can't enforce exhaustive typeswitching. Every pointer type is nullable, which means entire classes of runtime bugs which can't be caught at compile time. And the type system requires far too many escape hatches (resorting to `interface{}` and typeswitching) to have the kinds of type safety guarantees necessary. And lack of sum types means functions return errors and values instead of errors or values which—in my experience—has been an unending source of foot-guns in production code. OTOH, Rust has none of these drawbacks and many, many other strengths that enforce static guarantees about safety at compile time. It's not perfect, but it's an extremely worth successor to Ada and just about the only feature from Ada I wish it had was the ability to specify tighter domains on types (for instance, numeric ranges on integer types).
- jollybean 5y agoYes, there are no 'garbage collectors' in space. In fact, in my experience, there's not even any dynamic memory allocation! You allocate your memory on boot and work from it. Rust has some nice pointer advantages, but it's not specifically suited to those kinds of system, and would have some big cultural baggage to overcome. Rust has performance and perfect non-null safety in mind, not necessarily perfect logical safety. Space systems would be 'totally ok' with extra overhead that checked parameters, pointers, memory etc. before certain operations. That said, I can see Rust happening in space some day.