back

by Rochus·8mo ago·view on hn ↗
Well, OCaml is immutable by default, isn't it? Rust has no inheritance, but at least supports polymorphism, and ordinary bindings are immutable. There are OO languages where values of an object can only be set at construction time, or objects can be constant, or types can be private (as e.g. in Ada), etc.
1 comments
From my understanding OCaml is considered an FP language, and Rust I have no idea, it's a very special case.

The problem with mutability by default is that immutability loses so many advantages...

Caml is/was an FP language. OCaml has an "O" prefix because it is an OO & FP multiparadigm language.