AST files instead of DI interface files for faster compilation and easier distribution

Walter Bright newshound2 at digitalmars.com
Tue Jun 12 09:46:01 PDT 2012


On 6/12/2012 2:07 AM, timotheecour wrote:
> There's a current pull request to improve di file generation
> (https://github.com/D-Programming-Language/dmd/pull/945); I'd like to suggest
> further ideas.
> As far as I understand, di interface files try to achieve these conflicting goals:
>
> 1) speed up compilation by avoiding having to reparse large files over and over.
> 2) hide implementation details for proprietary reasons
> 3) still maintain source code in some form to allow inlining and CTFE
> 4) be human readable

(4) was not a goal.

A .di file could very well be a binary file, but making it look like D source 
enabled them to be loaded with no additional implementation work in the compiler.




More information about the Digitalmars-d mailing list