Since a long time, I’ve been thinking that an AbstractObject superclass of Object would open a lot of possibilities. Such a superclass would have the task of being as stupid as possible, so that it can be used as a delegator. This would follow the idea of Ruby’s BasicObject.
I wrote about it a bit here: AbstractObject RFC
Using a method overriding hack, I made a quark to freely experiment with some possibilities: GitHub - telephon/Neutral: experimental kernel addition for supercollider
Great news, @jordan has been working on a proper implementation of the core classes and it really looks good!
In particular, it will allow us to have safe object prototyping, runtime method extensions, halos, and dependency with garbage collection.
There has been a lot of previous work on object prototyping in sclang, so I hope there is a lot of experience ideas around what works well and what doesn’t.
For object prototyping, Jordan suggests a special syntax addition:
p = #(foo: fooFunc, bar: barFunc)
We can then decide what should be implemented as a class and what can be just a piece of ProtoObject code.