4 ms·
ive been learning Rust and it doesn’t seem like the clear win fans say it is. i recently ran into a variant of this problem: https://doc.rust-lang.org/nomicon/
by zaptheimpaler 5y ago
ive been learning Rust and it doesn’t seem like the clear win fans say it is. i recently ran into a variant of this problem:
https://doc.rust-lang.org/nomicon/lifetime-mismatch.html https://doc.rust-lang.org/nomicon/lifetime-mismatch.html
i know the lifetimes are fine, but Rust doesn’t. in a memory unsafe language i would have to model the mutability in my head to ensure the code is fine. i now need to model the lifetime checker and its limitations/false positives _in addition to_ the underlying mutability to understand whether a compiler error is actually a bug in my code or not. and this is in an extremely short & simple program.
a compiler that can truly enforce safety without too many false positives is definitely a win. but for now it seems like a leaky abstraction so it adds complexity instead of reducing it.