3 ms·
Besides the object system, OCaml has a powerful module system, with first-class modules and functors (which is already basically very equivalent to what you'd e
by Denommus 12y ago
Besides the object system, OCaml has a powerful module system, with first-class modules and functors (which is already basically very equivalent to what you'd expect from objects).
Besides that, objects have structural typing, and you can even create objects without classes (somewhat similarish to anonymous classes, except instead of interfaces you have the structural typing to give you something like statically typed duck typing).
OCaml also has multiple inheritance and friend classes.