Quote of the week
I'm all for moving the kernel to a less error prone programming language. I've done ADA programming in my former professional live and I'm well aware about the advantages of a "safe" programming language.— Thomas GleixnerFor me Rust is definitely the right way to go, aside of my personal distaste of the syntax and the insanity of abandoning an existing universe of ADA tools just because of 'not invented here', but that's a different discussion to be had.
That said, converging to Rust requires a massive effort of being disciplined on the C side in the first place. Otherwise the Rust abstractions will just end up being a mostly useless wrapper around the existing C insanities. Which in turn will neither reduce technical debt, nor be able to hold up the promise to squash a whole class of bugs.
Quite the contrary it will accelerate the problems we already have instead of reducing them, while everyone can pretend that we are so much better off.
TBH, converging to Rust is a real chance to move away from the "features first, correctness later" approach, but the way our community is approaching it right now is just following the old scheme by making Rust compatible to the "features first, correctness later" mantra.
Posted Oct 17, 2024 22:21 UTC (Thu)
by acarno (subscriber, #123476)
[Link] (2 responses)
But once you've learned to stop fighting the language and follow the paradigms it enforces, the power of _knowing_ that your code can't segfault, of being able to _prove_ that (barring a hardware failure) your code executes correctly... it makes each and every off-by-one error you encounter in a language like C all that more frustrating.
I digress. Back to debugging my indices manually.
Posted Oct 21, 2024 8:55 UTC (Mon)
by adobriyan (subscriber, #30858)
[Link]
C++ devs who use destructors can relay to this feeling. It becomes trivial to not have leaks.
In theory arch/arm64 and arch/x86_64 could be rewritten in Rust fully.
Posted Oct 22, 2024 1:52 UTC (Tue)
by jjs (guest, #10315)
[Link]
I like design for readability - it makes maintenance much easier (IMO). Comments are nice, but can get out of sync with the actual code if the programmers editing code don't update the comments. Also, design for readability, IMO, makes it easier to learn the language. You're already familiar with the words. Someone with computer programming skills but know knowledge of Ada can probably figure out what a program does, because of the readability.
I'm not familiar with Rust other than what I've read on websites like lwn.net, but in terms of some of the core design, from what I've read, they're similar. Avoid "Undefined Behavior." Check up front for issues (at compile time). Define "correct behavior" specifically, and make it hard to not do the right thing. Design for guaranteed behavior.
Unfortunately, initial compilers were slow, and slow to improve, due to various reasons (including, as I recall, mandatory compliance testing before you could use the name).
I miss Ada.
I miss Ada.
OCD of them become slightly frustrated with inability to say "v.leak()" before exiting program.
i386 too if someone proclaims i386 NotMuseum Architecture.
Ada was also easy to read