Damian Conway wrote:
> That should of course have been:
> 
> __ < 2 + __ * atan2($pi, __) or die __

Oh, yes, of course. Um, wait. Nope, I still don't follow. The
expression above curries to:

  sub { $_[0] < 2 + $_[1] * atan2($pi, $_[2]) or die $_[3] }

But the expression

  __ < 2 + __ * sin(__ / 2) or die __

curries to

  sub { $_[0] < 2 + $_[1] * sin(sub { $_[0] / 2 }) or die $_[2] }

That's very odd.

I really hope I'm missing something, but __ the way you use it
is too magical. It's not DWIM but DWISHMIIKWIWD (do what I should
have meant if I knew what I was doing).

Your original statement that an ad hoc curried expression stops
at a simple assignment sounds fine to me. (It actually fits in
very well with functional programming which avoids assignment.)

If that rule is modified by an explicit subroutine prototype that
establishes a curry context then I think we can make this stuff
work.

- Ken

Reply via email to