[plt-scheme] Swindle: defgeneric arity

From: Eli Barzilay (eli at barzilay.org)
Date: Fri May 26 07:15:51 EDT 2006

On May 25, Doug Orleans wrote:
> I'm just getting my feet wet with Swindle, and noticed that you
> can't have two methods with different arity on the same generic.  Is
> there a deep implementation (or design) reason for this, or is this
> just something left over from the CLOS tradition?
> (I realize I can probably use the MOP to make multiple-arity
> generics, but I'm not sure it's worth it...)

I tried that at the time, but IIRC it made things too complicated.  It
should be possible as long as all arities are distinguishable (maximum
of one `rest' arity, and all other arities smaller than that), but the
implementation is not going to be fun.

          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                  http://www.barzilay.org/                 Maze is Life!

Posted on the users mailing list.