3 ms·
What can you achieve using OCaml modules that you can't do using objects with a constructor in F#?
by Nelkins 8y ago
What can you achieve using OCaml modules that you can't do using objects with a constructor in F#?
- wtetzner 8y agoThere are a few advantages of modules. One is that they can encapsulate types along-side functions/values. Also, it can be advantageous that functors are applied at compile time. The really cool one though is abstract types. You can distinguish types purely in the type system, with no change to run-time representation, using module signatures that don't specify the concrete type of a type entry.