From: "James F.Hranicky" Date: 2002-06-12T22:56:43+09:00 Subject: Re: ruby-dev summary 17252-17356 On Wed, 12 Jun 2002 15:01:17 +0900 "Hal E. Fulton" wrote: > Bear in mind that these don't have to be > simple variables. Because multiple assignment > is used, they can be any "assignable" entity, > even a "setter" (method=) for an object. > > Someone once posted an example like: > > 1.upto(100) {|scrollbar.value| sleep 0.1 } > > Kind of neat, and I'd hate to break this kind > of orthoganality. True...it would have to be rewritten as 1.upto(100) {|x| scrollbar.value = x ; sleep 0.1 } right? Hmmm, well, this doesn't seem like a huge problem to me. OTOH, we could add an operator "outer" (or something) to go along with the "local" I and others have proposed for block variables: 1.upto(100) { |outer scrollbar.value| sleep 0.1 } Not quite as nice. My preference is still for || declaring block local, and having an explicit declaration for block local parameters. I'll live with the final decision, though, whatever it is :-> ---------------------------------------------------------------------- | Jim Hranicky, Senior SysAdmin UF/CISE Department | | E314D CSE Building Phone (352) 392-1499 | | jfh@cise.ufl.edu http://www.cise.ufl.edu/~jfh | ----------------------------------------------------------------------