[Apologies for late reply, but it takes a long time to read this many
messages]

On Wed, 30 Oct 2002 16:37:09 -0800, Michael Lazzaro wrote:
 1) Need a definitive syntax for hypers,
>      ^[op] and «op»
>      have been most seriously proposed -- something that
>      keeps a bracketed syntax, but solves ambiguity issues.
>
> 2) Possible inclusion of unary prefix ^, meaning "complement". (Assuming
>    doesn't conflict with (1))

If ^ means xor (and complement), then we can't use it for hypering. Consider
this example:

  @a ^[alpha_op] +3

You can parse this in two ways:
 * "array a", "hyperop alpha_op", "unary plus", "literal 3"
 * "array a", "binary xor", "call alpha_op and put result in arrayref",
   "binary plus", "literal 3"

The operator doing the least at present seems to be ! (my recent attempts to
reclaim it aside). If we keep ^ as the only xor/complement operator, we can
use ! as the hyperoperator indicator without ambiguity:

  @a ![alpha_op] +3

Or (since people seem to like using ^ for hyperness), we could steal ! back
as doing all the xor/complement things that ^ is doing now, and leave ^
doing just hyperstuff. This stops ! being a (mostly) synonym for ^, which I
didn't really like, but does bring back the confusion between !! and ||.

If we want to have a sigil meaning "the next set of brackets surround a
hyperoperator," it pretty much can't be the same as any of the other
operators, since that introduces ambiguity all over the place. This is
unfortunate, since perl seems to use every printable ASCII character for
something. Using French quotes gets around this, since they aren't being
used for anything else. OT3H, I can't find the «» keys on my keyboard, but
I'm sure I'm just not looking hard enough.


-- 
        Peter Haworth   [EMAIL PROTECTED]
"Are you the police?"
"No ma'am, we're musicians."

Reply via email to