On 10/13/05, Trans <transfire / gmail.com> wrote:
> >This one was proposed long ago as a way to declare a var whose scope is
> > outside the block:

> > lambda { <foo = 1|2> puts foo }
> All sorts of things can work, one that looks quite nice:
>
>   lambda { foo = 1|2 -> puts foo }
>
> But I would suggest that everyone give the -> () {} notation chance. I
> really hated it at first too, but it has grown on me and I am starting
> to like it even more then goal posts b/c of the way it brings the
> parameters outside of the block.

1. I don't use 1.9 at this point. It doesn't yet have the features
that I need that will make it important for me to use.
2. The ->(){} syntax is a trainwreck. It's a Russian military
manoeuver. It's Pompeii. I fear that I won't *ever* like it; the
parameters belong *inside* the block, IMO. Strictly speaking, the
parameters to a method are *inside* the method definition (they're
contained within the def/end pair). Why should blocks be any
different?

My main issue with ->(){} is that I had to hold down the shift key for
the last five characters. I don't have to hold down the shift key that
often for most of what I do with Ruby.

-austin
--
Austin Ziegler * halostatue / gmail.com
               * Alternate: austin / halostatue.ca