describe-d: an introspection library

Stefan Koch uplink.coder at googlemail.com
Wed Apr 22 05:20:18 UTC 2020


On Tuesday, 21 April 2020 at 14:43:04 UTC, Jean-Louis Leroy wrote:


> I wonder if templates are lazily expanded. I haven't looked at 
> the compiler's code, my guess is: maybe not.

If the template gets used it gets instantiated (and cached).
if not than not.
you can use the -vcg-ast switch to look at how your souce code 
looks "expandend".

> If these techniques get traction, it will incite compiler 
> developers to improve template instantiation, hopefully.

They already gained traction, unfortunately.
Making this system fast is not easy. And will need a few language 
changes, and some work from users (programmers) as well.



More information about the Digitalmars-d-announce mailing list