4 ms·
What's mutually exclusive is immutability though. There is an enormous difference when mutability is opt-in. Most OOP languages seem to require mutability, I'
by Fire-Dragon-DoL 11mo ago
What's mutually exclusive is immutability though.
There is an enormous difference when mutability is opt-in.
Most OOP languages seem to require mutability, I'm not sure if there is a possibility to avoid it.
I guess elixir could count as oop, but not in the canonical terms, just according to Alan Kay definition
- Rochus 11mo agoWell, 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.
- Fire-Dragon-DoL 11mo agoFrom 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...
- Rochus 11mo agoCaml is/was an FP language. OCaml has an "O" prefix because it is an OO & FP multiparadigm language.