Martin DeMello wrote:
> David A. Black <dblack / wobblini.net> wrote:
> >
> > I think what's happening is that people who've used Ruby for a while
> > get used to it, and then they sort of shift their readability
> > threshold.  In other words, if you've seen this:
> >
> >    a.map {|b| b.meth }
> >
> > for several years, then even though it looked beautiful and concise
> > and transparent to you at first, it will start to look verbose and
> > syntactically inefficient.  So then you might want to have:
>
> I usually come around to agreeing with you that so-and-so change adds
> more line noise than is worth it, but this particular one I've disliked
> right from the beginning. It's not just the visual clutter, it's the
> conceptual overhead of introducing a new variable merely because ruby
> has to attach a method to something. Note the progression from
>
> ary.sort {|a,b| a.meth <=> b.meth}
> ary.sort_by {|a| a.meth}
> ary.sort_by :meth

Shall I be so bold:

  ary.sort_by.meth

;)

T.