Is it possible to extend an individual object in Smalltalk

后端 未结 6 1616
灰色年华
灰色年华 2020-12-16 01:28

I\'m doing research in Smalltalk reflection, and I was wondering if it was possible to extend an individual object like that would be possible for instance in Ruby. With thi

6条回答
  •  盖世英雄少女心
    2020-12-16 02:12

    In Ruby, as far as I know, a method dictionary attaches to an object.

    In Smalltalk, the method dictionary is bound to a Class object so, in a vanilla Smalltalk image, you can't write eigenclass-like things.

    Having said that, there are a few prototype libraries: this question's answers mention quite a few.

提交回复
热议问题