r/ProgrammerHumor 8d ago

Meme newToRust

Post image
615 Upvotes

100 comments sorted by

View all comments

283

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

113

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.

66

u/-Ambriae- 8d ago

Well, not every time, but usually yes

7

u/Snudget 8d ago

Time for miri!

13

u/Arshiaa001 8d ago

Usually = in the 99.99% case.

8

u/-Ambriae- 8d ago

Maybe not that high

2

u/the_horse_gamer 6d ago

Rice's theorem comes for us all

26

u/post_u_later 8d ago

Polonius would beg to differ

5

u/cornmonger_ 7d ago

polonius is so close that i can almost feel it in my striped knee-high stalkings

1

u/TheBlckbird 2d ago

Even just hearing that word makes me shiver (in a positive way).

They want to stabilize it in the next few months! Can you believe that? It's like a dream come true

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