Re: RFC: new logical operator more syntactic maple syrup

2002-02-22 Thread Aaron Sherman
On Thu, 2002-02-21 at 19:49, Larry Wall wrote: David M. Lloyd writes: : On Thu, 21 Feb 2002, Sam Vilain wrote: : : I can't count the number of times I've had to do something like: : :if (defined $foo and $foo ne bar) { } : : to avoid my program writing garbage to STDERR. : :

Re: RFC: new logical operator more syntactic maple syrup

2002-02-22 Thread Larry Wall
Aaron Sherman writes: : On Thu, 2002-02-21 at 19:49, Larry Wall wrote: : David M. Lloyd writes: : : On Thu, 21 Feb 2002, Sam Vilain wrote: : : : : I can't count the number of times I've had to do something like: : : : :if (defined $foo and $foo ne bar) { } : : : : to avoid my

RFC: new logical operator

2002-02-21 Thread Sam Vilain
I think Perl 6 should have a but keyword, as in: if (defined $foo but $foo eq ) { } :-)

Re: RFC: new logical operator

2002-02-21 Thread hachi
On Thu, Feb 21, 2002 at 12:30:11PM +, Sam Vilain wrote: I think Perl 6 should have a but keyword, as in: if (defined $foo but $foo eq ) { *scratches head* so... it negates the left side, then ANDs it with the right? also, it seems to be rather vague to me. in order to sound clearer, I

Re: RFC: new logical operator

2002-02-21 Thread Sam Vilain
On Thu, 21 Feb 2002 06:50:13 -0600 [EMAIL PROTECTED] wrote: On Thu, Feb 21, 2002 at 12:30:11PM +, Sam Vilain wrote: I think Perl 6 should have a but keyword, as in: if (defined $foo but $foo eq ) { *scratches head* so... it negates the left side, then ANDs it with the right? No, but

Re: RFC: new logical operator

2002-02-21 Thread Randal L. Schwartz
Sam == Sam Vilain [EMAIL PROTECTED] writes: Sam No, but is syntactically equivalent to and in English. It just Sam implies that the second condition is not generally what you'd expect if Sam the first was true. Maybe in the interest of huffman encoding, we could make it even_though. :) --

Re: Re: RFC: new logical operator

2002-02-21 Thread jadams01
Randal L. Schwartz [EMAIL PROTECTED] wrote: Sam No, but is syntactically equivalent to and in English. It Sam just implies that the second condition is not generally what Sam you'd expect if the first was true. Randal Maybe in the interest of huffman encoding, we could make Randal it

Re: Re: RFC: new logical operator

2002-02-21 Thread Austin Hastings
It can't be that confusing at first glance if English dedicates a slot way up in the huffman table to the word, eh? print ; if ($need_eol but $current_column 21); OTOH, this might become an and grep-not operator for (was it Damian?)'s quantum operators: @y = all(@x) but { /^anti/ };

Re: Re: RFC: new logical operator

2002-02-21 Thread Melvin Smith
At 09:47 AM 2/21/2002 -0500, [EMAIL PROTECTED] wrote: Randal L. Schwartz [EMAIL PROTECTED] wrote: Sam No, but is syntactically equivalent to and in English. It Sam just implies that the second condition is not generally what Sam you'd expect if the first was true. Randal Maybe in the interest

Re: RFC: new logical operator

2002-02-21 Thread Aaron Sherman
On Thu, 2002-02-21 at 09:01, Sam Vilain wrote: On Thu, 21 Feb 2002 06:50:13 -0600 [EMAIL PROTECTED] wrote: On Thu, Feb 21, 2002 at 12:30:11PM +, Sam Vilain wrote: I think Perl 6 should have a but keyword, as in: if (defined $foo but $foo eq ) { *scratches head* so... it

Re: RFC: new logical operator

2002-02-21 Thread Sam Vilain
[EMAIL PROTECTED] (Randal L. Schwartz) wrote: Sam No, but is syntactically equivalent to and in English. It just Sam implies that the second condition is not generally what you'd Sam expect if the first was true. Maybe in the interest of huffman encoding, we could make it even_though. :)

Re: RFC: new logical operator more syntactic maple syrup

2002-02-21 Thread Sam Vilain
Aaron Sherman [EMAIL PROTECTED] wrote: An off-the-wall thought... If this is not the expected condition, should it have the extra meaning of an assertion? For example, could set $! to 'defined $foo but $foo eq ' and, if -w was in use, issue 'warn Exceptional condition: $!' Interesting idea;

Re: RFC: new logical operator more syntactic maple syrup

2002-02-21 Thread David M. Lloyd
On Thu, 21 Feb 2002, Sam Vilain wrote: I can't count the number of times I've had to do something like: if (defined $foo and $foo ne bar) { } to avoid my program writing garbage to STDERR. Of course you will now be able to say: if ($foo // ne bar) { } Right? - D [EMAIL PROTECTED]

Re: RFC: new logical operator more syntactic maple syrup

2002-02-21 Thread Larry Wall
David M. Lloyd writes: : On Thu, 21 Feb 2002, Sam Vilain wrote: : : I can't count the number of times I've had to do something like: : :if (defined $foo and $foo ne bar) { } : : to avoid my program writing garbage to STDERR. : : Of course you will now be able to say: : : if ($foo //