Composing features at compile time
Dicebot
public at dicebot.lv
Sun Nov 24 09:25:48 PST 2013
On Sunday, 24 November 2013 at 14:23:55 UTC, Philippe Sigaud
wrote:
> But how do you use policies to inject different code in
> different
> places of your struct?
Don't really get the question. Isn't it what policies do pretty
much by definition? You decompose part of target functionality
into smaller blocks with optional behavior (including no-op
behavior) and provide specific ones as alias parameters. D has
additional benefit of being able to use one as template mixin for
cleaner syntax. But I am pretty sure you know this, so what is
the question again? :)
More information about the Digitalmars-d-learn
mailing list