3 ms·
That's why functors (in the OCaml sense) are awesome. They let you parametrize a module over a module signature. It's really good if you know your dependencies
by mercurial 12y ago
That's why functors (in the OCaml sense) are awesome. They let you parametrize a module over a module signature. It's really good if you know your dependencies at compile time. If you don't, you can just use first-class modules to generate the module hierarchy on the fly, though there is a small syntactic cost.