logoalt Hacker News

pseudony • today at 8:33 AM • 2 replies • view on HN

Funny. I would think a GCed language was safer - maybe Haskell being the safest of all (outside even more niche languages) for its ability to encode so much in the type system.

Yet, for some curious reason, a substantial group of snake oil salesmen insist that only this one particularly cut puzzle piece (rust) fits the bill.


Replies

simonask • today at 8:47 AM

Who, exactly?

It has been known for decades that GC was one way to achieve memory safety. That was one of the main selling point of Java back in the 90s - no more segfaults.

Rust was an absolute breakthrough, because it provides a second way to gain memory safety, this time without the significant drawbacks of a garbage collector, bringing memory safety to systems programming. That's materially different.

The only other previous attempt at this was Ada, which for a variety of reasons never quite fit the bill despite its obvious strengths.

➕ show 1 reply
JuniperMesos • today at 9:02 AM

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.