Just one quick comment...
Sunil Mishra wrote:
>
> In article <··············@mute.eaglets.com> Sam Steingold <···@usa.net> writes:
> 5. How do I define `virtual' (a la c++) methods? (I guess, the java
> analogue is interface)....
>
> All method lookups are done at runtime, so all of them would be virtual.
I think that he was really talking about what C++ calls "Pure virtual
member functions":
class FooBar {
public:
virtual void FeedMe(void) = 0;
}
which you as a subclasser of FooBar are forced to implement. The above
is also an example of what C++ calls an "Abstract Base Class" or ABC.
Flavors (one of the original Lisp OO packages, the other being Loops)
had this feature: you could specify with keywords that a specific class
was "abstract" or "mixin-only" and it couldn't be instantiated. You
could then define a generic function that did something with your class,
and create a method specialized on the abstract class that would signal
an error.
You can still do this in CLOS, but you need to hack the MOP.
--
f l u i d e s i g n
www.fluidesign.com
Nate Holloway, Technical director
natedogg at fluidesign dot com