Austin Hastings writes:
> > -----Original Message-----
> > From: Luke Palmer [mailto:[EMAIL PROTECTED]
> > Sent: Friday, 19 March, 2004 10:06 PM
> > To: Joe Gottman
> > Cc: Perl6
> > Subject: Re: Some questions about operators.
> > 
> > 
> > Joe Gottman writes:
> > > 2) Do all of the xor variants have the property that
> > > chained calls return true if exactly one input
> > > parameter is true?
> > 
> > I would imagine not.  C<xor> is spelled out, and by
> > definition XOR returns parity.  On the other hand,
> > the junctive ^ (one()) is exactly one.
> 
> Hmmm: If infix:xor returns Scalar.boolean, there might be hope. This
> would involve returning something like a.or.b but a.xor.b.

I don't know what you're hoping for when you say 'hope.'

> 
> > 
> > > 3) Is there an ASCII digraph for the | operator?
> > No. Just use C<zip>. 
> 
> Re: | vs Â
> 
> Boggle! Who let that slip in?
> 
> I kind of got the impression he was asking about e.g., ??! or some
> such, a la ANSI C. (In the same vein as << for Â, etc.)
> 
> But no, it's far worse: every keyboard that is capable of generating
> '|' is labeled incorrectly. How's that for the principle of least
> surprise?

I've never been too fond of the (lack of) visual distinction between |
and  .  They're just too similar.  I'd much rather see something like
U+299A VERTICAL ZIGZAG LINE (â).  But alas, not in latin-1 (not to
mention my terminal's inability to render that character, but that
wasn't a design constraint last time I checked Â-).

But context serves us humans well here.  Very infrequently will you see:

    for @a | @b -> $a, $b {...}

My head hurts just thinking about what that actually does.  Among other
things, it should probably issue a warning saying "did you mean  ?"

> It's like the old Far Side cartoon showing "Ed's Dingoes" right next
> to "Martha's Day Care" -- trouble waiting to happen. Let's pray nobody
> uses Â...
> 
> =Austin
> 
> PS:
> 
> S3 appears inconsistent WRT the . operator and hyperoperation. One
> example uses ("f","oo","bar")Â.Âlength, while elsewhere you have
> @objectsÂ.run();

Oops.  The latter is correct.

Luke

Reply via email to