Hacker News new | ask | show | jobs
by JuniperMesos 18 days ago
Also you gotta write the garbage collector itself in some language that isn't itself garbage collected - usually C or C++, before Rust existed.

Anyway, it's basically slander to say that people advocating Rust are snake oil salesman. Rust is a genuine improvement to systems languages over the existing options (primarily C/C++) in multiple respects, not just memory safety; it is not a panacea that solves every problem or eliminates every possible bug, and no one involved with the project ever claimed that it did.

2 comments

This is a common mistake to voice out, since Lisp was created it is possible to write GC implementation in such languages, history is full of examples.

For the record here is the Oberon GC implementation, in Oberon.

https://people.inf.ethz.ch/wirth/ProjectOberon/Sources/Kerne...

If you want a more trendy example, check D or Go.

" no one involved with the project ever claimed that it did" - this may be true, MAY. But the Rust community is a large tent and, unlike Zig, Odin, Go, Java or whatever unusually motivated to roll in and suggest that a rewrite in their favorite language is necessary.

The amount of times I've seen, even on HN, not rewriting the world's C/C++/Zig/Odin software in Rust is a moral failing is.. well.. I've never seen any other language community argue that way - and this, very naturally, breeds animosity.

As for systems programming, whether Rust fits the bill is a much deeper and nuanced discussion than most drive-by Rust commentators seem to have patience for. I'd point out that in spite of C++ (also a language prioritising RAII) most serious systems software is written in C. Ignoring this fact and insisting that a new, better RAII language is the panacea of systems programming seems to me just a little unserious.

Most serious systems software is quite bad, full of security vulnerabilities, and being written in C has a lot to do with that. C's design makes it very easy to write code with subtle bugs, often security issues, and indeed most systems software written in C is full of security vulnerabilities and has been for decades.

I myself think that we should rewrite most of the world's C and C++ in something else (I specifically include the Linux kernel in this, among many, many other pieces of software). Rust is obviously a strong contender here, but this is not a specifically pro-Rust viewpoint, but an anti-C/C++ one. As I said, I don't think that Rust is a panacea or that it's reasonable to conceive of Rust as a panacea. I even think it is important to research new systems languages that are not Rust and that go even further in the direction of statically-guaranteeing program correctness properties than Rust does - I explicitly do not want to treat Rust as the only good or worthwhile language to write systems software in. This doesn't mean that the C/C++-based status quo is good.