On Thu, Sep 21, 2006 at 10:29:57AM -0400, Aaron Sherman wrote:
: I'll read that as "conversation terminated".

The conversation is never terminated.  However, every now and then I
make feeble attempts to be decisive.  :)

: Can you please update S03's "Junctive operators" section to note how the 
:  ambiguity of the following are resolved:
:  a|$b
:  a | $b
:  a |$b
: I presume that it will be based on whitespace, but they could also be 
: based on an inspection of a's signature (if a takes no parameters, then 
: the only useful meaning of C<a|$b> is C<infix:<|>(a(), $b)>, I think).

There's no whitespace dwimmery here.  Either 'a' takes an argument list or
it doesn't, based on its signature.  If it doesn't, all those are infix:<|>.
If it does, they are all prefix:<|>, except that we specifically outlaw
the first; list operators in Perl 6 require a space after them.

: I further presume that such an update will be required for the pugs/v6 
: team to correctly implement this.

Don't think so.  The situation is exactly analogous to:

    a + $b
    a +$b

and even more exactly analogous to:

    a % $b
    a %$b

The cultural ambiguity is also being reduced insofar as we're trying
to discourage use of bare constants in favor of sigilled constants.
If you see a bare function name you should generally assume it
has arguments in Perl 6.  We could probably go as far as to issue
an optional warning on the middle cases above based on whitespace
dwimmery and on whether the program gets in trouble later.  But it
would be a mistake to base the actual parsing on that.  That's the sort
of trick Perl 5 would have attempted, and I hope I know better now.


Reply via email to