On 3/5/22 16:48, Adam D Ruppe wrote:
Believe it or not, you don't need to touch the compiler. Open your
druntime's object.d and search for `RTInfo`
http://druntime.dpldocs.info/object.RTInfo.html
That is instantiated for every user defined type in the program and you
have the compile time info..... all druntime uses it for is a tiny bit
of GC info and even then only sometimes.
But it could do so so so much more. Including doing custom factories and
runtime reflection buildups!
This looks nice, but I actually meant to allow "template this" in static
contexts, as in the bug reports.
I think that might indeed need compiler support? You'll make me happy if
that's possible without touching the compiler!