From: Dominik Bathon Date: 2005-10-30T04:50:57+09:00 Subject: Re: "Readability" inflation On Sat, 29 Oct 2005 21:07:05 +0200, Trans wrote: > > Dominik Bathon wrote: > >> So, what we really need is the implicit block variable, because it can >> do >> all that ;-) >> >> ary.sort_by { it.meth } >> >> ary.sort_by { it.meth(foo, bar, wack!) } >> >> and even: >> >> ary.sort_by { some_hash[it] } > > Uh oh... > > ary.whatever_by { |it1, it2| ... } > > Now we're one step away from the from "ducking" it all: > > ary.whatever_by { %1.foo ... %2.bar } Maybe ary.whatever_by { it[0].foo ... it[1].bar } because block variables use multiple assignment anyway. But I would use the implicit version only for really simple things. If there are multiple block variables, then please name them. Dominik