From: Peter Date: 2003-12-17T23:28:37+09:00 Subject: Re: UnboundMethods Useless? > I don't know what you mean by (ir)reversible, but the point is that > it's meaningless to talk about arbitrary objects being able to do > arbitrary things. For example (and Guy has already given some), > String#strip removes whitespace. What would it mean to remove > whitespace from a Hash or a Fixnum or a MyThing? And more to the > point, what would happen if > > I don't mean: "Could such objects have some method called 'strip' > which made sense for them?" because that's not what you're suggesting. > What you're suggesting is that String#strip, Array#join, Thread#join, > IO#readlines, Regexp.escape, MyThing#some_method, and every other > method written for any purpose in Ruby should, without change or > adaptation, work for any Ruby object. By the same reasoning, Ruby is suggesting that any module makes sense in any class/object, because you can include a module in any class you'd like. With freedom comes the possibility of doing something wrong, but that doesn't make freedom wrong, now does it? Peter