[PRL] AOP questions

Joe Marshall jrm at ccs.neu.edu
Wed Mar 30 15:20:23 EST 2005


Doug Orleans <dougo at place.org> writes:

> Joe Marshall writes:
>  > Lisp allows multiple `dominant structures' to co-exist in a way
>  > that other languages (like Java) do not.
>
> I think this is a red herring, or else just plain false.  If you're
> using MzLib classes, the class hierarchy imposes a dominant structure.
> If you want to add a method to an existing class, you have to modify
> that class definition, or else make a new class that inherits from (or
> delegates to) the old one and then arrange for the rest of the program
> to use the new class in place of the old one.  (Or you could make a
> procedure for the new functionality, but then you wouldn't have
> polymorphism and inheritance.)
>
> If you're using Swindle, though, you can just define a new method for
> a generic function and nothing else needs to be modified.
> I.e. Swindle supports incremental development in a way that MzLib's
> classes don't.  But there are other things you can't do in Swindle
> either (without going into the MOP).

Well, I'm strong proponent of the CLOS/Swindle paradigm.

But note that Swindle co-exists quite nicely with MzLib classes, so
although the MzLib class-hierarchy imposes a dominant structure, you
can side-step that with a co-existing class paradigm.  Do *that* in
Java!

And yes, there are things that Swindle doesn't do, but that is what
the MOP is for, no?




More information about the PRL mailing list