tag:blogger.com,1999:blog-20425712.post8935841695110461519..comments2023-06-27T14:20:37.054+02:00Comments on Constantly Changing: First cut at the JVM dynamic languages metaobject protocolAttila Szegedihttp://www.blogger.com/profile/11586966395114113526noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-20425712.post-58103672288130058912007-07-27T21:15:00.000+02:002007-07-27T21:15:00.000+02:00Thanks for the recommendation -- I haven't read th...Thanks for the recommendation -- I haven't read the book proper, but I did briefly review the spec itself that's found at http://www.lisp.org/mop/contents.html. I wasn't aware that the book is available online; thanks for the heads up - it was going to go in my next batch of orders from Amazon (and it still will), but it's nice to be able to peruse the content until it arrives (especially given that it's two more weeks until I return to my home address).<BR/><BR/>Anyway, as for being slow: I'm aware that chaining many mops together in linear fashion could degrade performance, if that's what you meant. I have an optimization for this already. (I didn't want to burden the very initial implementation with optimizations for better understandability). Namely, I think I'll allow MOPs to declare whether they claim authority over an object solely based on its class. I expect many will do -- they'll only claim authority over their native objects. Then, subchains that contain only class-based MOPs can be replaced by a different composite MOP that dispatches based by object's class to its contained MOPs. <BR/><BR/>There are other possible optimizations as well, i.e. if the language runtime can prove that certain invariants hold at a certain call site, it could ask the MOP for a reusable invocation object that can be used to perform the call without repeatedly performing much of the dynamic lookups. However, this is all subject to discussion, to see whether (a) people need this sort of additional smartness at all, and (b) they have even better ideas.Attila Szegedihttps://www.blogger.com/profile/11586966395114113526noreply@blogger.comtag:blogger.com,1999:blog-20425712.post-61916325855357756102007-07-27T19:34:00.000+02:002007-07-27T19:34:00.000+02:00I read your post because I just finished "the art ...I read your post because I just finished "the art of the metaobject protocol" (which is available online through Google Books if you don't have library access). From your announcement, looks like a decent approach to the problem. It also looks like it may be very slow. If you haven't read that book, I highly recommend it.Justinhttps://www.blogger.com/profile/04138857652921543796noreply@blogger.com