From: Simon Strandgaard Date: 2004-03-08T11:59:40+09:00 Subject: Re: proposal: class< In message "Re: proposal: class< on 04/03/08, Simon Strandgaard writes: > > |Still... I propose that 'class< |of suitable replacement, so that initialization can take place. > |What do you think ? > | > |Should it be named #extended ? or have another name? > > Describe yourself deeper. What exactly is your proposal? When 'class< And why do you think it's needed? Its difficult to add an new instance variable to obj. Its inflexible compared to obj.extend(Mod), because there isn't invoked an #extend_object method when the extension occurs. An alternative to what I propose may be to do something ala (warning pseudo code).. which isn't intuitive.. class << obj def singleton_method_added(parent) if first time we got invoked @str = "hello" end end end > Remember, since singleton class always exists for each object > (virtually), 'class < I am only little familiar with class re-opening.. -- Simon Strandgaard