Do everything in Java…
Paulo Pinto via Digitalmars-d
digitalmars-d at puremagic.com
Wed Dec 10 04:15:51 PST 2014
On Wednesday, 10 December 2014 at 10:48:12 UTC, Walter Bright
wrote:
> 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.
My remark had nothing to do with IP.
I prefer the model used by the referred languages, where binary
libraries and metadata is used, instead of the C toolchain model.
For example, just shipping the .TPU/.DCU libraries in the Object
Pascal world.
--
Paulo
More information about the Digitalmars-d
mailing list