Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> it's coming from misunderstandings of what the language is

“You are just not holding it right.”

Rust borrow checker indeed does force you to make contorsion to keep it happy and will bite you if you fail to take its particularity into account. It’s all fine and proper if you think the trade-off regarding safety is worth it (and I think it is in some case) but pretending that’s not the case is just intentionally deluding yourself.

The people here implying that the BC forces you to use a good architecture are also deluding themselves by the way. It forces you to use an architecture that suits the limitations of the borrow checker. That’s pretty much it.

The fact that such delusions are so prevalent amongst part of the community is from my perspective the worst part of using Rust. The language itself is very much fine.



Can you give me an example of what the borrow checker prevents you from doing without calling Rust developers delusional? The hardships are way overstated, in my opinion. One issue I can think of newcomers might have is immutable and mutable references. You can't borrow as mutable something already borrowed. Let's say you have a reference to a Vec element, then you add an item to Vec. The realloc could invalidate that reference, which Rust prevents. Using Cell/RefCell also helps if you don't want to deeply nest &mut. Rust is definitely hard, but after a while it's fine and you kind of get how even if using another language you still have to think about memory.


I’m not calling Rust developers delusional. I’m calling people pretending the borrow checker doesn’t force you to specifically architecture your code to suit it delusional.

> Rust is definitely hard, but after a while it's fine and you kind of get how even if using another language you still have to think about memory.

That kind of comment is a typical exemple. It’s not that you have to think about memory. You have to understand the exact limitations of the analyser Rust uses to guarantee memory safety. I don’t understand why it’s so hard to accept for some part of the Rust community.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: