Re: RFC 23 Higher order functions

2000-08-08 Thread Damian Conway
> It strikes me that this is very fragile and limited (unless I > misunderstand, which is quite possible). We've thrashed out a much more comprehensive proposal, which I'll post this morning. Damian

Re: RFC 23 Higher order functions

2000-08-08 Thread Jonathan Scott Duff
On Tue, Aug 08, 2000 at 01:27:48PM -0400, Andy Dougherty wrote: > It strikes me that this is very fragile and limited (unless I > misunderstand, which is quite possible). For one thing, it appears to > only be useful if your subroutine uses each argument exactly once. If > you need to use any of

Re: RFC 23 Higher order functions -- macros instead?

2000-08-08 Thread Andy Dougherty
In RFC 23, Damian Conway <[EMAIL PROTECTED]> proposes a syntax for "higher-order functions". One example given is related to a proposed switch statement (RFC 22). A trimmed version is: > sub beverage { > switch (shift) { > case sub{ $_[0] < 10 } { retu

Re: RFC 23 Higher order functions

2000-08-08 Thread Andy Dougherty
Quoting RFC 23: > That is, the expression: > > $check = __ < 2 + __ * atan($pi/__) or die __; > > is equivalent to: > > $check = sub (;) { > $_[0] < 2 + $_[1] * atan($pi/$_[3]) or die $_[4] > }; It strikes me that this is very fragile and limited (unless