4 ms·
> OCaml (and therefor Reason) is FP first and OO on top of that That's a general opinion, which I find quite sad. The object system in OCaml (the 'O' in the na
by klibertp 9y ago
> OCaml (and therefor Reason) is FP first and OO on top of that
That's a general opinion, which I find quite sad. The object system in OCaml (the 'O' in the name stands for something...) is actually very well designed and is very different from what you may be used to from languages like Java (or even Ruby). It uses structural instead of nominal typing and separates class definition and object construction, while still being statically typed. Actually, lack of this particular OO system in F# is my biggest complaint against it.
- jasim 9y agoI would love to learn more about this. I've been programming in OCaml for a few months now and have stuck to records and immutable updates and modules for grouping behaviour. I really like this style compared to the object-oriented programming I was doing in Ruby. Real World OCaml has a chapter on objects and I'll give it one more read. But are there any other articles/links that expands on OCaml's object system and how it compares to conventional OO?