2009/8/31 Rick DeNatale <rick.denatale / gmail.com>: > On Mon, Aug 31, 2009 at 8:39 AM, Yusuke ENDOH<mame / tsg.ne.jp> wrote: >> I cannot guess the problem you want to solve. I know this mail >> is just discussion log or reminder, but I'd like you to elaborate >> your proposal completely when sending to ruby-core. > > Perhaps I'm mistaken but I think that besides the 'syntax' difference, > Yehuda's intent was that something like this would work: > > > class Person > def speak(str) > str > end > end > > p = Person.new > > p.speak("hello") #=> "hello" > > module LoudSpeaker > def speak(str) > super(str.upcase) > end > end > end > > class Person > prepend Voice > end > > p.speak("hello") #=> "HELLO" Even if it is Yehuda's intent, I cannot see yet when it is necessary. Indeed, we can define and refine classes dynamically, but I don't think that the feature's abuse is recommended. I think we should consider more actual circumstances than Person#speak to determine whether it is surely needed. -- Yusuke ENDOH <mame / tsg.ne.jp>