DIP81: Writing files at compile time

Dmitry Olshansky via Digitalmars-d digitalmars-d at puremagic.com
Wed Aug 12 23:11:13 PDT 2015


On 13-Aug-2015 02:27, Tofu Ninja wrote:
> On Wednesday, 12 August 2015 at 18:37:40 UTC, JDemler wrote:
>> Triggered by the original forum thread I wrote a DIP to further
>> explain the idea of the writing files at compile time feature and its
>> implications.
>>
>> http://wiki.dlang.org/DIP81
>>
>> Please discuss!
>
> The benefits of this I see are debugging, actually having the generated
> files makes it much simpler to see what is going wrong. Otherwise the
> utility of this can be achieved with string mixins.

pragma(msg, your_mixin);

>
> A simple alternative to this would be a flag to the compiler to expand
> mixins and output the new files. This would also be great for tooling,
> an IDE could use this and allow you to expand a mixin in place to see
> what it looks like. And currently all the auto complete engines I have
> seen for D don't handle mixins very well. Expanding them would make
> autocompletion a simpler job.

I agree with Ola, something more restricted then filesystem is required.

-- 
Dmitry Olshansky


More information about the Digitalmars-d mailing list