Compilation strategy

Paulo Pinto pjmlp at progtools.org
Sun Dec 16 23:56:00 PST 2012


On Monday, 17 December 2012 at 01:11:22 UTC, Jonathan M Davis 
wrote:
> On Sunday, December 16, 2012 16:57:31 Walter Bright wrote:
>> I've done such (precompiled headers for C++), I've done .di 
>> files, and I've
>> done Java bytecode. .di files are superior in nearly every way.
>
> Given that .di don't work with inlining or CTFE, I'd consider 
> them to be a
> very poor solution. You're seriously impairing yourself if you 
> use them. It's
> pretty much BS that corporations insist on header files to hide 
> implementation,
> since it really doesn't work, but if we're going to be forced 
> to a have a
> solution which tries to hide implementation to make folks like 
> that happy, we
> could at least have one that doesn't cripple the language like 
> .di files do. It
> may not truly hide the implementation any better than .di files 
> do, but at
> least it would allow us to still use the language properly.
>
> I'm not expecting this problem to be fixed any time soon (we 
> have far higher
> priorites), but I really do think that in the long run .di 
> files should be
> deprecated in favor of a binary solution which doesn't stop 
> things like
> inlining or CTFE from working.
>
> - Jonathan M Davis

Similar solutions work for Ada, Modula-3, F#, Haskell, OCaml, just
to cite a few languages with generic types and modules.

So the issue is how .di files are implemented, not the general 
concept.

--
Paulo


More information about the Digitalmars-d mailing list