"John L. Allen" wrote:
> 
> Ok, so that's pathological, but this isn't
> 
>         perl -e 'print -rwx($_)'
>         Undefined subroutine &main::rwx called at -e line 1.

Well, it is still a little weird. You're still negating a subroutine
call. And remember, if you have a sub called "r" this doesn't work right
currently:

   sub r {
       return 41 + $_[0];
   }
   $file = '1';
   unless ( -r $1 ) {
      print 'our total was: ', -r $1, "\n";
   }

If you want to do what you're proposing, why not just put parens around
it?

   perl -e 'print -( rwx $_ )'

Or not even that, how about just a space?

   perl -e 'print - rwx $_'

This is needed to fix the above 'r' example currently. And how often do
you have to directly negate sub calls??

I'm not trying to turn a deaf ear to your concerns, but I do think
they're not showstoppers. Negating sub calls with no space is weird, and
so is negating strings, which are the only two things making a leading -
special in the given context could conflict with. And there's already
plenty of places currently (as shown above) where this conflict exists
and doesn't seem to be causing any problems.

> Hmmm, does
> 
>         -^{rwx}
> 
> have a currying interpretation?

Yes, it does, see Damian's RFC on higher-order functions. 

-Nate

Reply via email to