3 ms·
OCaml's type system isn't capable of preventing shared mutable references. So you don't get the same compile-time safety guarantees in OCaml when you use mutati
by foldr 7y ago
OCaml's type system isn't capable of preventing shared mutable references. So you don't get the same compile-time safety guarantees in OCaml when you use mutation.
- brmgb 7y ago> you don't get the same compile-time safety guarantees in OCaml when you use mutation. OCaml is a garbage collected and mono-thread language. You obviously have the same guarantees in that you can't do what would be problematic. As a side note, a lot of the people currently writing Rust would ihmo be better served by Ocaml. You rarely need the protections Rust provides and they have a real complexity cost.
- foldr 7y ago>OCaml is a garbage collected and mono-thread language. Well, yes, but that's the point. Rust gives you the same guarantees without limiting you to using a single thread or requiring you to use garbage collection. >You rarely need the protections Rust provides and they have a real complexity cost. Agreed.