logoalt Hacker News

benjaminkiefl • yesterday at 5:27 PM • 1 reply • view on HN

As always the same tropes get repeated ad nauseam.

Rust code using `unsafe` != C code:

-) you can encapsulate `unsafe` internals behind safe interfaces

-) you can concentrate operations requiring manual safety reasoning in small parts of the codebase

-) safety obligations become explicit

-) `unsafe` does not turn off the borrow checker, type checking, ordinary bounds checks, or automatic cleanup and you still benefit from Rust's provided abstractions and its composability

I'm not a Rust shill, and not a single programming language I use is part of my online identity, but if "Rust is a cult", the anti-Rust gang isn't?

Getting more and more annoyed by the latter to be honest.


Replies

wat10000 • yesterday at 5:45 PM

Yeah, I'm always told that the Rust community is obnoxious and condescending. But I never actually see it. I do see a bunch of obnoxious anti-Rusters show up every time Rust gets mentioned to complain about it.

Also not a Rust shill, I used it for a few months about a decade ago. I am a memory-safe-programming-languages shill, though. I know there are good reasons people still use C-family languages (and I'm often one of them) but we should definitely be doing our best to move off them as quickly as we reasonably can.