From: "Ara.T.Howard" Date: 2005-10-07T00:42:55+09:00 Subject: Re: foo= ... the only exception to the implicit-self rule ? On Fri, 7 Oct 2005, David A. Black wrote: > Hi -- > > On Thu, 6 Oct 2005, Ara.T.Howard wrote: > >> i think a symbol for local vars makes a TON of sense and is, really, in >> keeping with ruby's design since every other scope is signaled by a symbol. > > That ("in keeping with Ruby's design") is only true if you assume that the > non-local variables somehow represent the truth about Ruby's design in a way > that the local ones do not. I would suggest, however, that the "bareword" > nature of local variables is 100% as much part of Ruby's design as the $var > nature of globals, etc., is. true. methods are barewords too though - sometimes. note that i don't __mind__ typing 'self.var = 42' - it just would be even nicer not to. although part of me thinks it's clear to always use 'self' since implicit self can obfusicate method calls in 4000 lines of code, espcially when the attr was set dynamically or via a variable. it's a tough problem for sure. > The thing is, it doesn't have to be a "winner-take-all" contest between two > abstractions (with symbol/without symbol). It's a system; it can have > components that differ from each other, and/or are similar to each other, in > any number of ways. agreed. -a -- =============================================================================== | email :: ara [dot] t [dot] howard [at] noaa [dot] gov | phone :: 303.497.6469 | Your life dwells amoung the causes of death | Like a lamp standing in a strong breeze. --Nagarjuna ===============================================================================