Wednesday, June 4, 2008

Beyond Scripting Language OO: Minimal Object Models


One of the frustrations of any object model is living with the implementation. How can I change the rules of multiple inheritance (never mind the total insanity of wanting multiple inheritance)?

If you've ever used something like CLOS, you have never realized that you are a slave to the object model of your language. Can you change the inheritance rules? Can you change the method lookup algorithm? Can you change the object structure?

In a "programmable programming language" you can change the rules of the object system, defined by a MOP.

To me the holy grail is making as many parts of the implementation "first class" as possible. Can I tweak the virtual method tables? Can I reference closures, scopes,  or stack frames as some data type that I can manipulate and change the behavior of the language.

So what sort of minimal, least restrictive implementation could we do for the platform for dynamic languages. I don't know the answer, but Ian Piumarta has written some interesting papers on the subject. Be sure to check out id-object, which combined with LLVM seems like ripe ground for experimentation.

No comments: