Proposal: __traits(code, ...) and/or .codeof
F i L
witte2008 at gmail.com
Tue Oct 9 12:05:33 PDT 2012
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.
More information about the Digitalmars-d
mailing list