Re:Killing the C++ Modules Technical Specification
by pjmlp on Wednesday October 11, 2017 @10:08AM
(#15449860)
True, but there is an actual definition.
https://en.wikipedia.org/wiki/Modular_programming
There are plenty CS books which offer a similar definition to Wikipedia.
Re:Killing the C++ Modules Technical Specification
by qznc on Wednesday October 11, 2017 @10:30AM
(#15450027)
For 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.
Re:Killing the C++ Modules Technical Specification
by pjmlp on Wednesday October 11, 2017 @11:22AM
(#15450483)
The 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.
> 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