On 12/10/2014 2:24 AM, Paulo Pinto wrote:
This cannot be the solution if D aspires to be used in contexts where binary
libraries are used.
C++ is excused to have template code in headers given the primitive tooling, but
languages like Ada and Modula-3 support proper information hiding for generic
code.
There's no way you can hide the implementation of a function from the user if it
is available to the compiler.
Quite a few people thought C++ "exported templates" would make this work, but
there is no known way to implement it and keep it hidden from the user, not even
if it is encrypted since the compiler must decrypt it.