On Fri, 2002-08-09 at 14:47, Mathieu Bouchard wrote: > > On Sat, 10 Aug 2002, Tom Sawyer wrote: > > why couldn't ruby just check to see if there was such a setter method > > first, prior to assuming it a local variable assignment? the only > > consequence of this would be that you could not use local variable names > > identical to your method names. something i tend to do anyway. > > Because of the wild ways in which Ruby can do inheritance > (<,<<,#include,#extend) and delegation (#method_missing), methods may pop > up in unplanned spots. Your feature causes a leakage of influence between > the local namespaces and the method namespaces, which is highly > undesirable semantically ("hairy"), in addition of really slowing things > down. leakage of influence? in all other cases the method is looked up. if i have: p = proc { joe } p.call what do i get? undefined local variable or method 'joe' one or the other. there's already "influence". i think speed is really the only possible draw back. but i don't know how much speed loss it would entail. additonally an explict local assignment operator could still be an option: localvar .= 'whatever' with this, or some equivalent notation, the lookup speed loss would be circumvented. ~transami