interface + mixin combination

Daniel Keep daniel.keep.lists at gmail.com
Mon Oct 30 05:58:28 PST 2006


How about doing it around the other way?

> template SlotTracking
> {
>     implements ISlotTracking;
>     // implementation...
> }
>
> class Reciever
> {
>     void handleClick() { writefln("in ad2101 button clicked!"); }
>     mixin SlotTracking;
> }

After all, you might want to implement the interface without pulling in
the mixin, but using the mixin doesn't make much sense *without*
implementing the interface.

Another syntax idea while I'm at it:

> template SlotTracking : ISlotTracking
> {
>     // implementation...
> }

	-- Daniel

-- 
Unlike Knuth, I have neither proven or tried the above; it may not even
make sense.

v2sw5+8Yhw5ln4+5pr6OFPma8u6+7Lw4Tm6+7l6+7D
i28a2Xs3MSr2e4/6+7t4TNSMb6HTOp5en5g6RAHCP  http://hackerkey.com/



More information about the Digitalmars-d mailing list