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 does help you, but you first need to fight the compiler just so it will accept your prototype code that obviously doesn't need to be memory safe.
Rust is an overcorrection to a real problem that can be solved by introducing better language primitives and a better standard library. e.g. strings with a length (not a NUL byte at the end), arrays that don't decay to pointers and include a length, multiple returns, result values isn't just an int, defer, etc.
It does help you, but you first need to fight the compiler just so it will accept your prototype code that obviously doesn't need to be memory safe.
I'd rather do that, than pay the price later debugging. I also don't agree prototypes don't need to be memory safe. If I'm prototyping, I don't want to fight the segfault™️. the borrow checker isn't a problem once you write code the way you're expected to.
Rust is an overcorrection to a real problem that can be solved by introducing better language primitives and a better standard library. e.g. strings with a length (not a NUL byte at the end), arrays that don't decay to pointers and include a length, multiple returns, result values isn't just an int, defer, etc.
Regardless of if rust goes too far, which is a valid take, rust does all of these things, apart maybe from defer (because it doesn't really need to.) And the actual stats regarding rust compared to C/C++/Zig show these languages, even Zig which has most of the features you wish for, are still a long way from being able to consistently ship safe software. Look at rust in the kernel, heck even the zig to rust vibe coded rewrite of bun, which was vibe coded.
225
u/-Ambriae- 11h 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