2 ms·
> that is, i recognize that these tradeoffs are possible. i just disagree that they're necessary That's a nice theoretical position; however, the current progr
by bsder 2y ago
> that is, i recognize that these tradeoffs are possible. i just disagree that they're necessary
That's a nice theoretical position; however, the current programming languages as they exist disagree with you.
I would also point out the one of the problems in "systems programming" is that it encompass both "can run full blown Linux" and "slightly more CPU than a potato and has no RAM". Consequently, there are VERY different lenses looking at "systems programming".
> i don't agree that either systems programming or tight low-level control requires accident-prone languages (and i'm especially surprised to see that assertion coming from an apparent rustacean)
Rust is particularly poor when you can't define ownership at compile time. If you have something that you init once and then make read-only, you will be writing unsafe. If memory ownership passes between Rust and something else (say: memory between CPU and graphics card), you will be writing lots of unsafe. RPC via shared memory with a non-Rust process--prepare for pain.
Writing "unsafe Rust" is super difficult--moreso that straight C/C++. If you are writing enough of it, why are you in Rust?
You have to architect your solution around Rust to make the most of it and lots of things (especially stuff at runtime) are off limits. See: Cliff Biffle from Oxide and all the things he needed to do to make their RTOS completely defined at compile time because anything at runtime just gave Rust fits.
- steveklabnik 2y ago> because anything at runtime just gave Rust fits. This is not the main reason that hubris does things up front. It does that because it makes for a significantly more robust system design. From the docs: > We have chosen fixed system-level resource allocation rather than dynamic, because doing dynamic properly in a real-time system is hard. Yes, we are aware of work done in capability-based memory accounting, space banks, and the like. https://hubris.oxide.computer/reference/#_pragmatism https://hubris.oxide.computer/reference/#_pragmatism
- kragen 2y ago> That's a nice theoretical position; however, the current programming languages as they exist disagree with you. as i pointed out in another comment, c++ is a good example of having tight low-level control without programming with a lot fewer abstractions, and c++ is hardly a little-known language we can dismiss as irrelevant so the current programming languages as they exist do not disagree with me