Get the latest tech news
X Design Notes: Unifying OCaml Modules and Values
Programming, math, and other things gratuitously nerdy. Opinions are my own.
With these rules, we can safely allow extending a module with the contents of some arbitrary other value, which should support the most common reason why people might want this syntax in OCaml. By contrast, the version of let mod syntax for X shown in the previous section requires an explicit type annotation at the point where the module is bound. With modules out of the way, there are several other OCaml features left to integrate into X, notably nominal types(including records and variants) and GADTs, subjects I hope to address in subsequent blog posts about the planned design of X.
Or read this on Hacker News