← Back to context

Comment by flandre

2 years ago

It wouldn't look like anything because "modern" means bloated garbage that does less in more time. You guessed it, I'm talking about Rust, and when you're writing a kernel out of all things, Rust has infinite disadvantages and 0 advantages over C.

I'm sure many people have a lot to say to counter this fact, but really, all I need to do is look at https://www.cvedetails.com/vulnerability-list/vendor_id-1902..., whoever begins writing a Rust kernel will reintroduce at least half of these and the other half will be bugs you never even imagined because of false sense of security and lower barrier to entry into a field that's pretty bare, and very very cruel.

If you really believe that Rust fixes having to remember 300 different hardware types that you support and somehow will check that your code is safe for all of them at compile time, you're gravely mistaken.

> You guessed it, I'm talking about Rust, and when you're writing a kernel out of all things, Rust has infinite disadvantages and 0 advantages over C.

I don't think that's a defensible claim, nor that your evidence is compelling. Rust has some disadvantages vs C, certainly - I'd start with number of target hardware platforms, personally - but I doubt that they're meaningfully infinite. Likewise, rust certainly has more than 0 advantages over C; just making the most common memory errors harder to hit would be fairly compelling on its own (personally I like Pascal and Ada for that, but apparently Rust hit the popularity jackpot so oh well). As to rust having CVEs... sure, it's not perfect, but I have to notice that that page shows no more than a handful of vulnerabilities per year, while, say, Linux has had far more vulnerabilities, many of them caused by the exact memory errors that rust tries to fight.

There are legitimate arguments against rust (honestly, your initial claim of bloat sounds plausible), but unless I've missed something this isn't the one I would pick.