Ken Fox wrote:
> Actually I was wrong about ^ not working. The binary operator ^ is XOR.
> The unary "operator" ^ could be for curries.
>
Right. I though you were just worried about it looking confusing. I don't
think the parser will be bothered (at least, I can't think of anything
ambiguous so far).
> I still like &? and &0, &1, ... best though. The common form &? is not
> likely to be accidentally typed either. BTW, the number represents the
> order of the argument in the function -- the arguments don't have to be
> in the order they appear in the expression. The major failure of this
> syntax is it doesn't allow named placeholders, only numbered. I think
> being able to control the order of the arguments is more important than
> naming them. If the function is so big you forget what &1 and &2
> mean, then I think the curry needs a helper function.
>
Ugh. I think '&' is asking for trouble, whether it's named, numbered, or
anonymous. I still get confused the way '&' in C++ is both the address-of
operator and the notation for reference parameters. They're similar but
completely different, and that's plain confusing. Having '&' in perl as the
subroutine prefix and the placeholder prefix would also be confusing, if you
ask me (or even if you don't!) And most importantly, having parameters that
share syntax with Oracle SQL is just plain demeaning ;-)
Anyhoo, there's no reason why you can't have ^1, ^2, and so forth, _and_
allow named placeholders too. Although I don't see what this buys you. But I
still think the default/anonymous placeholder wants to be ^_, for
consistancy with $_.