Logan Capaldo
1/12/2007 6:47:00 PM
On Sat, Jan 13, 2007 at 03:25:06AM +0900, Daniel Berger wrote:
>
> Gregory Brown wrote:
> > On 1/12/07, Robert Dober <robert.dober@gmail.com> wrote:
> >
> > > x = 41
> > > x.succ! => 42
> > > x => 42
> >
> > This is probably in the same vein as ++.
> >
> > I don't like it because since integers are immediate values in ruby,
> > that looks messy.
>
> How about....x++ ?
>
> I know, I know - it's pretty radical, but it's 2007. I think we're
> ready.
>
Maybe x++. I'm pretty sure it can't be a method.
consider x.method(:succ!), letting x fall out of scope and then
invoking #call on that method. Ruby would have to realize it would need
to make a closure (unless we just had no unboxed values).
> Regards,
>
> Dan
>
> PS - Evan Phoenix did this for Sydney, so it's possible. Evan, got a
> parse.y patch for us?
>