386
borrow checker? (thelemmy.club)
you are viewing a single comment's thread
view the rest of the comments
[-] HrabiaVulpes@europe.pub 6 points 1 day ago

Sounds like java garbage collector but backwards... perhaps I will understand it better if I ever try Rust.

Thank you for explanation, YaBoyMax

[-] calcopiritus@lemmy.world 11 points 1 day ago

Yes, the end goal is very similar to a garbage collector. Both are advanced systems of memory management.

The most important difference being that a garbage collector runs at runtime, while the borrow checker at compile time. Which means that the borrow checker has 0 impact on the program's performance. It just takes longer to compile the program.

Which also means that, while the garbage collector says "you can do whatever you want with memory, don't worry about it, I'll handle it for you". The borrow checker says "you fucking donkey. Why did you do that? I won't compile this if you don't fix it".

So you trade programmer comfort for performance (end user comfort).

this post was submitted on 06 Jul 2026
386 points (98.7% liked)

Programmer Humor

32192 readers
1266 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 3 years ago
MODERATORS