3 ms·
Rust's type system prevents bugs far beyond mere memory bugs. I would even go as far as claiming that the type system (together with the way the standard librar
by wongarsu 3y ago
Rust's type system prevents bugs far beyond mere memory bugs. I would even go as far as claiming that the type system (together with the way the standard library and ecosystem use it) prevents at least as many logic bugs as memory bugs.
- dartos 3y agoThe type system was built to describe memory layouts of types to the compiler. But I don’t think it prevents any more logic bugs than any other type system that requires all branches of match and switch statements to be implemented. (Like elm for example)
- speed_spread 3y agoIt prevents a lot more than that. For example, it prevents data race conditions through Send/Sync traits propagation.
- kaba0 3y agoBesides preventing data races (but not other kinds of race conditions), it is not at all unique. Haskell, OCaml, Scala, F# all have similarly strong type systems.