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.
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.