Re:A Module System for C++ (Revision 2) [pdf]
by pjmlp on Wednesday October 15, 2014 @02:53AM
(#8457423)
Modules go at least all the back to Algol 68 and Mesa, but C designers choose to ignore them.
C++ design goal of being able to target unmodified C toolchains as a means of being accepted by C developers, meant C++ also had to keep away from modules.
Luckily C++ can stand on its own nowadays and depart from such decisions.
Re:A Module System for C++ (Revision 2) [pdf]
by coliveira on Tuesday October 14, 2014 @10:09PM
(#8456857)
Turbo Pascal used a similar scheme, but they split every source file into an "interface" and an "implementation" section. The interface would end up as information exported to other modules, but in binary form. No other part of the process had to read the original source file.
A more digestible description of this can be found in a Modula 2 reference manual:
http://www.modula2.org/reference/modules.php
The Modula 2 compiler I worked with years ago simply had you put the definition modules into .def files and the implementation modules into .mod files. So it's vaguely like headers, except that the .def files have structure and can be compiled; the compiled info is then referenced during compilation of the client modules. The .def file is never directly referenced as text.