4 ms·
The word "module" has very different meanings. When I read about 1ml [0] I stumbled upon this: > A definition like this, where the choice of an implementation
by qznc 9y ago
The word "module" has very different meanings. When I read about 1ml [0] I stumbled upon this:
> A definition like this, where the choice of an implementation is dependent on dynamics, is entirely natural in object-oriented languages. Yet, it is not expressible with ordinary ML modules.
Here, ML modules are compared to classes (not packages or modules has defined in Java, for example). This makes me wonder how often people talk past each other without noticing, when they discuss modules.
[0] https://people.mpi-sws.org/~rossberg/1ml/1ml.pdf https://people.mpi-sws.org/~rossberg/1ml/1ml.pdf
- pjmlp 9y agoTrue, but there is an actual definition. https://en.wikipedia.org/wiki/Modular_programming https://en.wikipedia.org/wiki/Modular_programming There are plenty CS books which offer a similar definition to Wikipedia.
- qznc 9y agoFor Java, class, package and (Java 9 Jigsaw) module all fit the Wikipedia definition of module. We might have consensus about the definition, but it does not seem to be a useful precise one. The C++ working group seems to have a similar problem. Things like "compilation unit" have a precise meaning, but they cannot find consensus if it should relate to their "module" or not.
- pjmlp 9y agoThe basic concept of module is having language support for code separation, with data/code hiding, compiler type checking across modules and optimally a binary format. I think the issue is more with some C++ devs that never used other languages, trying to grasp how modules fit into translation unit + PCH model they know.