From: Tom Sawyer Date: 2002-08-10T16:04:18+09:00 Subject: Re: ambiguity between local variable assignment and writter method > class A > def initialize(n) > thing = n > puts "Initializing with argument #{thing}." > end > end > > class B < A > attr_writer :thing > end > > What happens when you now say: > > b = B.new(123) > ... > (I think this is related to what Dave was saying about subclasses in > response to Rich, though that's in a slightly different context.) i see. yes, that would be a problem. although there are plenty of particulars of knowing how the superclass and the subclass will interact, so i do not see that as going against it. the fact that the interaction is not a one-thing-to-its-like-thing but rather a local varible assignment interacting/interferring with a method, that is problematic. and this just would not work. you are right. and i am assumming too that Rich's idea has the same problem. yes, i did suggest := and/or .= earlier, but only as speed convience. i would not not vote for it. now there only seems two options left, and they are both constructions. the construction just stated above (:=) or, and i think the proper way to have done it, a prefix symbol for local variables. %localvariable = 'i am me, not some method' unfortunately that's just not going to go over well with the population at large. and i can only wish that it was included early on. all variables would have a prefix (%, @, @@, $) and methods would not, Ruby might be a tad faster, and our conversation would never had to exist. ;-) ~transami p.s outside of another solution. i have to fall back, unless you all like %, yeah right! :-} thanks!