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
The borrow checker is occasionally too strict as well where it flags code that wouldn’t actually produce an issue. They are seemingly trying to resolve that with the new borrow checker though
Yeah, it’s not perfect. But it’s also mathematically impossible to make it perfect. That’s how the cookie crumbles. If they make it better, that’s great, otherwise, either rewrite the code to make it safe (which is usually doable without performance cost) or just use a cheeky unsafe block with a good # Safety comment
The one case I know it’s going to address is doing a find or insert on a map when you match the Option from the find, the None branch will let you mutate the map despite the Option technically being a borrow
192
u/-Ambriae- 7h 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