From: Ned Konz Date: 2001-08-15T02:15:45+09:00 Subject: [ruby-talk:19713] Re: Why not?: Assigning to self On Tuesday 14 August 2001 09:45 am, you wrote: > >>>>> "N" == Ned Konz writes: > > N> In other cases (speaking in class terms), become() would be used two > swap two N> objects that share a common superclass > > pigeon% ruby -e 'p Class < Object; p Array < Object' > true > true > pigeon% I should have said "supertype". Clearly, if you swap a Class for an Array, you're going to have problems. But Ruby is a dynamic language with untyped variables anyway; it's easy to pass the wrong type as an argument to a method. And few people who are comfortable with dynamic languages seem to have problems with this, since they know better than to pass the wrong type. I don't see that introducing become() (if it could be done without affecting other parts of the language) would hurt, and it would help in those (admittedly uncommon) cases where it's warranted. -- Ned Konz currently: Stanwood, WA email: ned@bike-nomad.com homepage: http://bike-nomad.com