[squeak-dev] Implementing a "prototype" in Squeak

Chris Muller asqueaker at gmail.com
Mon Apr 26 16:47:37 UTC 2010

Yes, you could work WriteBarrier to dynamically generate override
methods in an anonymous subclass.

Also, you might try Googling for "mixins".  I think there was a
Smaltalk impl. of mixins a long time ago..

On Sat, Apr 24, 2010 at 10:07 AM, Miso <fojtik at gmail.com> wrote:
> Hi, I'm trying to creating a concept similar to "prototype" (like
> prototype-oriented programming) in Squeak. What I want is an object's
> methodDictionary to be stored in itself. So when I send a message to an
> instance, Squeakshould look in the instance's dictionary (as opposed to
> class' dictionary) and call method stored there.
> Closest thing I managed to do was create an anonymous class (subclass on my
> custom class) for each instance and return instance of this class, and store
> the anonymous class in the instance so I can work with it. Is there any
> other way to do it, without modifying compiler/VM or writing custom
> compiler? If not, please give some pointers where to look for some
> information about "core" of Squeak.
> Thanks
> Michael
> --
> View this message in context: http://forum.world.st/Implementing-a-prototype-in-Squeak-tp2063564p2063564.html
> Sent from the Squeak - Dev mailing list archive at Nabble.com.

More information about the Squeak-dev mailing list