logoalt Hacker News

tomkarho • today at 7:09 AM • 2 replies • view on HN

True but C never went out of its way to highlight memory safety features and shut down (with a rather aggressive posture to boot) any criticism of the language with arguments revolving around this feature as if it was the Christ's second coming.

In lieu of finding out that there are in fact multiple memory issues in std is at least amusing and some might say well deserved egg in the face of the more, shall we say, enthusiastic defenders of the language.


Replies

mahboi • today at 8:22 AM

You mean the Rust fans. And there are C fans who say that only n00bs do accidental UB. Nobody cares what fanatics say.

➕ show 1 reply
microtonal • today at 7:24 AM

I have my share of criticism of Rust. But even a safe language has to deal with unsafe memory etc. at some point in the stack. The goal is to minimize such uses of unsafe and for the cases of unsafe that exist to prove that they are safe.

These haha gotcha's are criticism leveled at language designers who never denied that there is unsafe code, that there can be bugs in unsafe code, and that such bugs can leak to safe code.

egg in the face

Is it an egg in the face when it requires LLM analysis to find these nowadays? It tells me that the Rust developers got really good at eliminating memory bugs that are lurking in unsafe code.

Also, this doesn't change anything to the benefits of Rust's ownership model, which removes classes of bugs that are very common in C/C++, so the Rust advocates were still right.

(I'll leave my rants about Rust in a thread where it's more appropriate, but they are not about memory safety.)