All~ Regarding MM dispatch, I implemented a version of this for a class of mine once. The version I have is in C++, and heavily uses templating to provide compile time type checks where appropriate. Despite these differences, however, I think that the system of caching methods and the system of finding the appropriate method could be easily adapted.
http://www.cs.swarthmore.edu/~bulnes/PL/lab1/index.html If anyone finds that interesting or has corrections for me, please send them. Boots ----- "Computer Science is merely the post-Turing decline of Formal Systems Theory." -??? > -----Original Message----- > From: Dan Sugalski [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 22, 2003 2:55 AM > To: Piers Cawley > Cc: Christopher Armstrong; [EMAIL PROTECTED] > Subject: Re: Objects, finally (try 1) > > > At 9:24 PM +0000 1/21/03, Piers Cawley wrote: > >Dan Sugalski <[EMAIL PROTECTED]> writes: > > > Hrm, interesting. Single symbol table for methods and attributes, > >> though that's not too surprising all things considered. That may make > >> interoperability interesting, but I was already expecting that to some > >> extent. > > > >Isn't that, essentially what Perl 6 will have too? > > Nope. Attributes and methods will be very separate. Attributes are > class-private, more or less, so they won't be in the symbol table. > Methods, OTOH, will be, as they aren't really private at all. > > I've been thinking about how to handle methods, as we need a > mechanism everyone can share--you need a method cache for good > performance, and the last thing I want to have to deal with is a > dozen method caches for a dozen different language implementations, > especially as everyone's guaranteed to get the first version wrong. > (Plus, of course, there's MM dispatch to deal with, which needs to be > global as well) > -- > Dan > > --------------------------------------"it's like this"------------------- > Dan Sugalski even samurai > [EMAIL PROTECTED] have teddy bears and even > teddy bears get drunk