Musings about modularity and programming in the large

itsme213 itsme213 at hotmail.com
Thu Jan 24 21:58:38 UTC 2008


(All this may be painfully obvious to others, and this is somewhat off-topic 
from the original post, apologies ...)

>"Andreas Raab" <andreas.raab at gmx.de> wrote Not unless you really recreate 
>the full ST-80 model. There is a ton of subtleties in the design which is 
>hard to recreate properly.

I'm sure I overlook tons of stuff :)

> ... but as soon as you introduce new Metaclasses in the structure you are 
> breaking the inheritance of the metaclass hierarchy.

If you will bear with me ... perhaps you mean this in the sense of the 
"Uniform and safe metaclass composition" paper by Stephane et al. Ruby does 
object-level customization in a way which retains the inheritance structure, 
roughly as follows:

x = String.new
class << x
  def dance_and_sing
    ...
  end
end

x.dance_and_sing

- if object x is instanceOf (a regular, non-singleton) class C
- customizing object x (e.g. dance_and_sing above) will
  - insert an anonymous singleton class xC' _below_ C
     (if needed; not if x already had a singleton class)
  - put x customomizations into xC'
  - x is still (indirectly) an instance of the original C

Would something like that be relevant to not breaking the inheritance of the 
metaclass hierarchy?

- Sophie 






More information about the Squeak-dev mailing list