2 ms·
Finally concepts ! But the module spec feels a bit weird ( https://isocpp.org/files/papers/n4720.pdf https://isocpp.org/files/papers/n4720.pdf ). I mean, "imp
by linkdd 6y ago
Finally concepts !
But the module spec feels a bit weird ( https://isocpp.org/files/papers/n4720.pdf https://isocpp.org/files/papers/n4720.pdf ).
I mean, "import M" should create a M namespace with the imported symbols. Here, it's more like "from M import *" in Python.
- pjmlp 6y agoC++ already has namespace for that.
- HelloNurse 6y agoPython collapses the name of the module (usually the name of a file) and the name of the "namespace" on the importing side, while C++ modules add a level of indirection by specifying arbitrary namespaces for module content (independent of the name of the module). Evidently, the complexity of finding the same namespace in multiple compilation units has been considered acceptable for C++ modules because it was already handled decently.