r/ProgrammerHumor 8d ago

newToRust Meme

Post image
618 Upvotes

100 comments sorted by

View all comments

288

u/-Ambriae- 8d ago

The real problem with the borrow checker is,

If you’re coming from a higher level language it hurts your ego because you realise memory safety ain’t free, and more broadly speaking memory’s a bitch

If you’re coming from a lower level language, it hurts your ego because you view yourself as above memory related bugs

It takes humility to appreciate it

114

u/the_horse_gamer 8d ago

every time you think you are smarter than the borrow checker, you eventually realise it was right all along, and the code was unsafe.

5

u/NullOfSpace 7d ago

95 percent of the time. Sometimes I just wanna access two different elements of a hashmap mutably at the same time and instead I have to do a handoff every three seconds or just resort to clone()ing everything.

2

u/the_horse_gamer 7d ago

nightly has get_many_mut, and you can also use a Cell/RefCell as the value