|
|
|
|
|
by Blikkentrekker
1868 days ago
|
|
Some of the rather impressive type system features of Ocaml: - Modules can be stored in variables, based on runtime conditions, this is all statically type checked to ensure tht the module exports the binding of the proper type. Modules can also be passed to functions and functions can produce different results based on which module is passed. - There are keyword arguments and optional arguments with full static type checking. - It has full support for row type polymorphism, or “static duck typing” as some call it: it tests statically whether an object quacks like a duck. https://dev.realworldocaml.org/first-class-modules.html |
|