[racket] Turning car/cdr into multi-methods

From: Patrick Li (patrickli.2001 at gmail.com)
Date: Sun Oct 16 23:41:37 EDT 2011

Thanks for all the replies. This is very helpful to have a google-able term
to get started. I will read up on how other people have handled these
problems. I would think that Smalltalk would run into similar issues.

Racket is nice to get started with, but eventually I will need to move this
onto a different system, so I cannot rely upon Racket's utilities. Even
though they are very nice!


On Sun, Oct 16, 2011 at 7:37 PM, Neil Van Dyke <neil at neilvandyke.org> wrote:

> Patrick Li wrote at 10/16/2011 09:15 PM:
>  Does anyone have some tips for wrapping their heads around recursive
>> things like this?
>> e.g. writing multi-methods using normal functions, and then somehow
>> turning everything into multi-methods?
> I think that might be a simple module (or Racket #lang) problem: your
> module imports the ``primitive'' "car" and "cdr", and exports the
> multimethod replacements for the primitives, using the same names as the
> primitives.
>    OR writing an object system, where your classes are also objects, etc...
> When I was using Smalltalk or Self, I believe this was sometimes called
> ``infinite meta-regress.''  I would use that term as a Google starting
> point.  I'd also read up on all the Gregor Kiczales et al. writings on CLOS,
> including the *Art of the Metaobject Protocol* book.
> I'd also take another look at Eli Barzilay's Swindle package for Racket,
> which, IIRC, included a CLOS-like object system including multimethods.
>  Although, you have the advantage of modern Racket, which Eli didn't have a
> bazillion years ago when Swindle was first written, so there might be some
> new fun opportunities.
> --
> http://www.neilvandyke.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20111016/7a334386/attachment.html>

Posted on the users mailing list.