From: Mark Hubbart Date: 2005-10-26T07:42:57+09:00 Subject: Re: Implicit block argument On 10/25/05, Edward Faulkner wrote: > On Wed, Oct 26, 2005 at 04:17:46AM +0900, Dominik Bathon wrote: > > I would like to propose a shortcut for block arguments (the magic block > > argument ;-) > > > > > I am not sure about the @ sign, other possibilities might be $ or $ plus > > something or something completely different, it should just be short. > > Since the function of such a variable is to act as a pronoun, it makes > more readable code if you name it "it": > > my_array.each { print it } > > I first saw this idea in the proposal for Arc. > > > And nobody would be forced to use it, it would be completely optional, > > just an alternative. > > This is not a good argument, because reading is as important (or more > important!) than writing. If someone chooses to write it, everyone > needs to be able to read it, whether they like it or not. Which has already been fully discussed (disgust?) in the (in)famous "mouse poop sandwich" thread [1] from around this time last year. cheers, Mark [1] http://groups.google.com/group/comp.lang.ruby/browse_frm/thread/ca3be493eec94ab1