On Tuesday, 9 October 2012 at 13:28:55 UTC, luka8088 wrote:
Is this at least similar to what you had in mind ?
[ ..code.. ]
Yes, I realized, a bit after I originally posted that, that my
suggestion was already possible if BankType & Logger where
mixin-templates instead of struct/classes. Thanks for the code
example though.
I still think an built-in .codeof/.astof would be nice, but what
D really needs to achieve this in a syntactically pleasing and
powerful way, is 'macro' templates (like Nimrod has) which work
on the AST directly. I doubt this is a major concern ATM however.