I am 100% for this. It would be very .NET like. In fact I'm curious enough what it would take to make this work that I could see myself trying. My guess is that it needs a new linker with the glorious side-effect of dumping optlink! In that case it would mean upgrading the D backend to emit COFF (ELF and Mach-O already support custom sections), which I am fine with trying to do. Then you would add your AST or other intermediate representations to a custom section in the object file and the linker could then link it in. D would then need a way to extract said information. Which would not be terribly hard. Except that you'll have to train other compilers how to read that IR. Maybe we could train D to read the LLVM IR?

:O I was writing a response pretty much exactly like this (i.e. doing what .NET does), but then I dumped it, thinking it'd be dismissed as too huge of a change...

Reply via email to