Template mixins: Why is the decision to mixin made at the call site?

Ary Borenszweig ary at esperanto.org.ar
Fri Aug 21 11:52:21 PDT 2009


div0 wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Jarrett Billingsley wrote:
>> On Fri, Aug 21, 2009 at 1:36 PM, div0<div0 at users.sourceforge.net> wrote:
>>
>> That's what he's suggesting, and it does make sense.  When you write a
>> template, *either* it's meant to be used as a mixin, *or* it's meant
>> to be used some other way.  Mixin in a template that wasn't meant to
>> be a mixin or vice versa usually makes no sense.
> 
> Hmmm.
> 
> Not convinced by that argument, I can think of good reasons to use a
> template as both.

Can you provide an example?


More information about the Digitalmars-d-learn mailing list