Re: junctions vs English negatives.

2005-05-15 Thread Larry Wall
On Mon, May 16, 2005 at 10:37:13AM +1000, Damian Conway wrote: : Luke wrote: : : >Hmm. I'll just [mention] that if != is implemented like this: : > : >multi sub infix: (Any|Junction $a, Any|Junction $b) { : >!($a == $b); : >} : > : >Then it Just Works. : : I'd be fine with the dw

Re: junctions vs English negatives.

2005-05-15 Thread Damian Conway
Luke wrote: Hmm. I'll just [mention] that if != is implemented like this: multi sub infix: (Any|Junction $a, Any|Junction $b) { !($a == $b); } Then it Just Works. I'd be fine with the dwimmy version if that is the underlying rule, since then the behaviour isn't a special case, and

Re: junctions vs English negatives.

2005-05-15 Thread Ashley Winters
On 5/15/05, Luke Palmer <[EMAIL PROTECTED]> wrote: > multi sub infix: (Any|Junction $a, Any|Junction $b) { > !($a == $b); > } > > Then it Just Works. Also, that's the right way to provide a working != for any object which defines ==. We all want that, right? Ashley Winters

Re: junctions vs English negatives.

2005-05-15 Thread Luke Palmer
On 5/14/05, Damian Conway <[EMAIL PROTECTED]> wrote: > Larry wrote: > > > I don't think we can allow this situation to stand. Either we have > > to make != and !~ and ne transform themselves via "not raising", or > > we have to disallow negative comparisons on junctions entirely. > > > > Opinions

Re: junctions vs English negatives.

2005-05-14 Thread Damian Conway
Larry wrote: I don't think we can allow this situation to stand. Either we have to make != and !~ and ne transform themselves via "not raising", or we have to disallow negative comparisons on junctions entirely. Opinions? Making them DWIM here would be a mistake, since the dwimmery would disappear

Re: junctions vs English negatives.

2005-05-14 Thread Rod Adams
Larry Wall wrote: We have a bit of a problem with negative operators applied to junctions, as illustrated recently on PerlMonks. To wit, when a native English speaker writes if $a != 1 | 2 | 3 {...} they really mean one of: if not $a == 1 | 2 | 3 {...} if $a == none(1, 2, 3) {...} or, e

Re: junctions vs English negatives.

2005-05-14 Thread Jonathan Scott Duff
On Sat, May 14, 2005 at 09:31:29AM -0700, Larry Wall wrote: > I don't think we can allow this situation to stand. Either we have > to make != and !~ and ne transform themselves via "not raising", or > we have to disallow negative comparisons on junctions entirely. I'm of the opinion that disallow

junctions vs English negatives.

2005-05-14 Thread Larry Wall
We have a bit of a problem with negative operators applied to junctions, as illustrated recently on PerlMonks. To wit, when a native English speaker writes if $a != 1 | 2 | 3 {...} they really mean one of: if not $a == 1 | 2 | 3 {...} if $a == none(1, 2, 3) {...} or, expressed in