|
|
|
|
|
by hmfrh
953 days ago
|
|
> So ultimately, the borrow checker doesn’t seem worth it if you actually think about the cognitive overhead and headaches it brings. You quite literally also have to "borrow check" C/C++ in order to have a well formed program, just without any compiler assistance. |
|
For structs that I do not want to heap-allocate, they're usually POD types and in arrays (which you can bound check), so there's not much to think about borrowing. The more concerning issue I usually have is about about initializing the values correctly (which usually Rust doesn't help, when reasoning about performance-sensitive code).