RE: Some questions about operators.

2004-03-22 Thread Paul Johnson
Austin Hastings said: Let's look at boolean xor: if ($a xor $b xor $c) {...} should succeed only when exactly one of ($a, $b, $c) is true. I think it is generally accepted that xor is true iff an odd nnumber of its argumnets are true. -- Paul Johnson - [EMAIL PROTECTED]

Re: Some questions about operators.

2004-03-22 Thread Damian Conway
John Macdonald wrote: if ($a xor $b xor $c) {...} should succeed only when exactly one of ($a, $b, $c) is true. That's not the definition of xor that I learned in school. It's taking a simplified form of the definition that works for two arguments and then expanding it to multiple arguments -

Re: Some questions about operators.

2004-03-22 Thread Larry Wall
On Tue, Mar 23, 2004 at 07:35:39AM +1100, Damian Conway wrote: : However I do think that, now we have Cone to carry the load of exists : uniquely, Larry will probably decide that Cxor is strictly binary, and : hence generalizes to the parity form in the n-ary case. Hmm, I probably will. :-)

RE: Some questions about operators.

2004-03-20 Thread Austin Hastings
-Original Message- From: Luke Palmer [mailto:[EMAIL PROTECTED] Austin Hastings writes: From: Luke Palmer [mailto:[EMAIL PROTECTED] Joe Gottman writes: 2) Do all of the xor variants have the property that chained calls return true if exactly one input parameter is

Re: Some questions about operators.

2004-03-20 Thread Simon Cozens
I'm not sure that having quaternary logic in Perl 6 is necessarily a good idea. Why stop only at four states? -- ... though the Japanese must be the most stupid people... I'm sure I read somewhere that Tokyo has the densest population in the world... - Gid Holyoake, sdm.

Re: Some questions about operators.

2004-03-20 Thread Damian Conway
Austin Hastings wrote: Granted. But some pitaph is going to come along and find a novel new use for zip outside of loops. And then it's going to be in an expression of some kind, where the parser won't know what to do... %hash = @keys @values; Oh, and it's petaQ not pitaph. Hey...wait a

RE: Some questions about operators.

2004-03-20 Thread Austin Hastings
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Simon Cozens I'm not sure that having quaternary logic in Perl 6 is necessarily a good idea. Why stop only at four states? Indeed: undef, unset (disagreeable undef, a la NaN), nocare (always matches),

Re: Some questions about operators.

2004-03-20 Thread Simon Cozens
[EMAIL PROTECTED] (Austin Hastings) writes: I'm not sure that having quaternary logic in Perl 6 is necessarily a good idea. Why stop only at four states? Total about twelve possible states plus junctions, of which eight or nine would be 'useful', and only three would be knowingly used.

RE: Some questions about operators.

2004-03-20 Thread Austin Hastings
-Original Message- From: Damian Conway [mailto:[EMAIL PROTECTED] Austin Hastings wrote: Granted. But some pitaph is going to come along and find a novel new use for zip outside of loops. And then it's going to be in an expression of some kind, where the parser won't know

Re: Some questions about operators.

2004-03-20 Thread Damian Conway
Austin Hastings wrote: Oh, and it's petaQ not pitaph. Umm, no. It's pitaph, vice japh. (Better than gdtsfhogwaph, certainly.) Oh, then in that case: english You called me a pain in the ass? I should kill you were you stand!! /english ;-) BTW, how did you generate that , or

broken bar (Re: Some questions about operators.)

2004-03-20 Thread Karl Brodowsky
Dear All, I think that the broken bar is dangerous. Why: It can be mixed up with the normal bar |. In some fonts it looks the same. And to many people it is not 100% clear, which of the two bars is the broken one and which not. Off course it is possible to avoid this, but that is not solving

Re: Some questions about operators.

2004-03-20 Thread Dan Sugalski
At 9:19 PM + 3/20/04, Simon Cozens wrote: [EMAIL PROTECTED] (Austin Hastings) writes: I'm not sure that having quaternary logic in Perl 6 is necessarily a good idea. Why stop only at four states? Total about twelve possible states plus junctions, of which eight or nine would be 'useful',

Re: broken bar (Re: Some questions about operators.)

2004-03-20 Thread Larry Wall
Well, maybe we should use yen (¥) instead. It even looks like a zipper. (Of course, we'll leave out the little problem that half the people in Japan would read it as a backslash wannabe...that's not really a problem since a zipper would only be used where an operator is expected, and backslash

Re: Some questions about operators.

2004-03-19 Thread Luke Palmer
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. Cxor is spelled out, and by definition XOR returns parity. On the other hand, the junctive ^ (one()) is exactly one. 3)

RE: Some questions about operators.

2004-03-19 Thread Austin Hastings
-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

Re: Some questions about operators.

2004-03-19 Thread Luke Palmer
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