Re:OCaml for the Masses (2011)
by int_19h on Monday November 26, 2018 @03:37PM
(#18536582)
> Being a statically typed language, you don't have something like Ruby's mixins to share code, nor do you have OO's interface inheritance.
But you do, though. You have open object types, and you can write generic functions in terms of those types, which effectively serves as interfaces (or traits) in other languages.
But you do, though. You have open object types, and you can write generic functions in terms of those types, which effectively serves as interfaces (or traits) in other languages.