Tuesday, January 31, 2006

exporting information to the public

After a discussion about open-sourcing a tool Szann recommended to make a puzzle about a topic that currently is irrelevant for software that relies on an open source tool chain.

C++ does provide a keyword "export". Most people don't even know about this keyword because unfortunately there currently is no open source compiler that does support it and commercial compilers that support it are quite rare as well. Instead of making use of the export keyword people are used to put all template code into header files that have to be included from every source file that creates concrete instances of the template code. This is a problem because it makes the compiler compiling the same code multiple times and it is a problem because commercial software vendors have to ship the full source code of template code of their libraries.

Explain how the export keyword can be used instead of including the full template code from each translation unit. Does this improve compilation time? Does this allow commercial software vendors to build a shared library of their template code instead of shipping the full code?

No comments: