[plt-scheme] Composing mixins

From: Carl Eastlund (carl.eastlund at gmail.com)
Date: Fri May 22 11:14:49 EDT 2009

On Fri, May 22, 2009 at 11:07 AM, Dave Gurnell <d.j.gurnell at gmail.com> wrote:
> Hi all,
>
> Is there anything special about a mixin that distinguishes it from a regular
> procedure, apart from the fact that it operates on classes? In other words,
> if I compose two mixins like this:
>
> (define b<%> (interface ()))
> (define c<%> (interface ()))
>
> (define mixin-ab (mixin ()     (b<%>) (super-new)))
> (define mixin-bc (mixin (b<%>) (c<%>) (super-new)))
>
> (define mixin-ac (compose mixin-bc mixin-ab))
>
> is mixin-ac actually a mixin?
>
> Cheers,
>
> -- Dave

Yup, that's a mixin.  Go for it.

-- 
Carl Eastlund


Posted on the users mailing list.