logoalt Hacker News

simonask • today at 4:06 PM • 3 replies • view on HN

No, Rust does not allow that. The current Rust compiler does, but that’s a bug that is being fixed.

At some point in the future, a fully backwards compatible Rust compiler will report an error when you try to compile cve-rs.


Replies

mitxela • today at 5:31 PM

I define undefined behaviour as a bug in C++. Now C++ is memory-safe!

btw, it's not actually that hard to write correct code in C++, easier than in C because you have all the container types. The problem is that nothing will tell you when you write incorrect code - there's no guarantee.

➕ show 1 reply
ghusbands • today at 4:55 PM

Isn't one of the bugs around ten years old, now? Isn't ten years enough to call something a feature of the language rather than a bug?

I like Rust, but with this bug existing for so long, I personally no longer think of it as memory-safe.

➕ show 1 reply
nick__m • today at 4:45 PM

Since we are not at some point in the future where that correct compiler exists and there is only one official compiler, the distinction you make is practically meaningless!

➕ show 1 reply