Author Topic: Modules  (Read 10140 times)

bas

  • Full Member
  • ***
  • Posts: 220
    • View Profile
Modules
« on: May 04, 2015, 11:41:09 AM »
The default C/C++ language communities are gaining momentum to fix the Header file problem.
Here is another interesting proposal for Modules in C++:

http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2015/n4465.pdf

What I noticed was that they also state macro's as a big problem and also use the word Evolution.
So more indications we're moving in the right direction  :D

There are some differences howevery:
  • In C2, you can choose which declarations to export outside the source (in the recipe file)
  • The paper exports all symbols put in the module, C2 distinguishes between public in a Module and exporting from the compilation unit
  • The paper proposal sub-modules, while C2 only allows a single layer to avoid having to mangle the symbols
  • In C2 you only type-once, so no forward decls, etc. The paper requires exporting the symbol, separate from defining it.
« Last Edit: May 04, 2015, 12:42:29 PM by bas »