On Nov 16, 2007 12:40 PM, David A. Black <dblack / rubypal.com> wrote:

> On Sat, 17 Nov 2007, David Flanagan wrote:
>
> > Here's the (extreme) example from my book:
> >
> > chars = "hello world".tap {|x| puts "original object: #{x.inspect}"}
> >  .each_char         .tap {|x| puts "each_char returns: #{x.inspect}"}
> >  .to_a              .tap {|x| puts "to_a returns: #{x.inspect}"}
> >  .map {|c| c.succ } .tap {|x| puts "map returns: #{x.inspect}" }
> >  .sort              .tap {|x| puts "sort returns: #{x.inspect}"}
> >
> > The method chain goes vertically down the page, relying the new
> > fluent-programming syntax Matz enabled, and the taps stretch out
> > horizontally.
>
> I wouldn't use the term "fluent" to describe this new and, to my eye,
> very jarring idiom. It seems significantly *less* fluent -- meaning,
> it doesn't flow; you have to backtrack to the previous line to figure
> out what the line with the dot is doing. I'm rooting for it to be
> backed out of 1.9, or at least 2.0.

I've got to agree with D.A.B. here.  No offense D.F. but to my eye
that code is ugly and unreadable.
-- 
Rick DeNatale

My blog on Ruby
http://talklikeaduck.denhaven2.com/