RFC 25 (v2) Operators: Multiway comparisons

2000-09-18 Thread Perl6 RFC Librarian
This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE Operators: Multiway comparisons =head1 VERSION Maintainer: Damian Conway <[EMAIL PROTECTED]> Date: 4 Aug 2000 Last Modified: 18 Sep 2000 Mailing List: [EMAIL PROTECTED] Number: 25 Vers

Re: Multiway comparisons

2000-08-17 Thread John Porter
raptor wrote: > RFC 25 (v1): Multiway comparisons > ... > I think the idea of leaving the value "j" in "i > j" is cool... RFC 84. -- John Porter

Multiway comparisons

2000-08-17 Thread raptor
RFC 25 (v1): Multiway comparisons and now snip from the Icon language : http://www.cs.arizona.edu/icon/docs/ipd266.htm 2.1 Conditional Expressions In Icon there are conditional expressions that may succeed and produce a result, or may fail and not produce any result. An example is the

Re: RFC 25 (v1) Multiway comparisons

2000-08-08 Thread Martyn J. Pearce
On Fri, Aug 04, 2000 at 04:48:24PM -0400, John Porter wrote: > I think this should mean what it means in Icon, namely, that > $x < $y evaluates to false if $x >= $y, and evaluates to > "$y (but true)" if $x < $y. This allows the operators to be > nested, i.e. $x < $y < $z would be ( $x < $y )

Re: RFC 25 (v1) Multiway comparisons

2000-08-05 Thread Chaim Frenkel
> "DC" == Damian Conway <[EMAIL PROTECTED]> writes: DC> I very much like Icon's failure model, but I was loathe to try and DC> graft it wholesale onto Perl 6. Doing it properly would require a DC> substantial rethink of the exception mechanism, flow control, the DC> nature of scalars, undef,

Re: RFC 25 (v1) Multiway comparisons

2000-08-05 Thread Chaim Frenkel
Source filters, look at the _entire_ input stream. So unless the input stream implements a perl parser, it is limited to a simple textual replacement system. A macro system, is _handed_ a portion of text, (and possibly the input stream) and asked to return a blob of text to be further parsed.

Re: RFC 25 (v1) Multiway comparisons

2000-08-05 Thread Johan Vromans
John Porter <[EMAIL PROTECTED]> writes: > I think this should mean what it means in Icon, namely, that > $x < $y evaluates to false if $x >= $y, and evaluates to > "$y (but true)" if $x < $y. Icon also allows $x == ( 1 | 2 ), meaning ($x == 1) || ($x == 2). -- Johan

Re: RFC 25 (v1) Multiway comparisons

2000-08-04 Thread Ken Fox
Jonathan Scott Duff wrote: > On Fri, Aug 04, 2000 at 10:52:24PM -0400, Ken Fox wrote: > > Why would we ever use source filters when we're going to have a > > beautiful extend-syntax macro system. > > Because source filters *are* that macro system. Why would we invent > yet another language withi

Re: RFC 25 (v1) Multiway comparisons

2000-08-04 Thread Jonathan Scott Duff
On Fri, Aug 04, 2000 at 10:52:24PM -0400, Ken Fox wrote: > Why would we ever use source filters when we're going to have a > beautiful extend-syntax macro system. Because source filters *are* that macro system. Why would we invent yet another language within a language when we can use a language

Re: RFC 25 (v1) Multiway comparisons

2000-08-04 Thread Ken Fox
Jonathan Scott Duff wrote: > If implemented via source filters, $x < $y < $z would get translated > to $x < $y && $y < $z, which, of course, short circuits. No need for > "$y (but true)" (Although, we already have "0 but true" until someone > submits an RFC to remove it ;-) Why would we ever u

Re: RFC 25 (v1) Multiway comparisons

2000-08-04 Thread Damian Conway
> > > This RFC proposes that multiway comparisons such as: > > > > > > if ( 0 <= $x < 10 ) { print "digit" } > > > > > > should do what the user means. > > I think this should mean what it means in I

Re: RFC 25 (v1) Multiway comparisons

2000-08-04 Thread Jonathan Scott Duff
On Fri, Aug 04, 2000 at 04:48:24PM -0400, John Porter wrote: > I think this should mean what it means in Icon, namely, that > $x < $y evaluates to false if $x >= $y, and evaluates to > "$y (but true)" if $x < $y. This allows the operators to be > nested, i.e. $x < $y < $z would be ( $x < $y )

Re: RFC 25 (v1) Multiway comparisons

2000-08-04 Thread John Porter
> > This RFC proposes that multiway comparisons such as: > > > > if ( 0 <= $x < 10 ) { > > print "digit" > > } > > > > should do what the user means. I think this should mean what it means in Icon,

Re: RFC 25 (v1) Multiway comparisons

2000-08-04 Thread Damian Conway
> I suspect it already has a different meaning, based on operator > precedence rules, left to right evaluation, etc., but I strongly > doubt there is much use of it in that manner, and would encourage > this redefinition to be used instead. It's currently an error (even if you redefin

Re: RFC 25 (v1) Multiway comparisons

2000-08-04 Thread Glenn Linderman
6 RFC Librarian wrote: > This RFC proposes that multiway comparisons such as: > > if ( 0 <= $x < 10 ) { > print "digit" > } > > should do what the user means. -- Glenn = There are two kinds of people, thos

RFC 25 (v1) Multiway comparisons

2000-08-04 Thread Perl6 RFC Librarian
=head1 TITLE Multiway comparisons =head1 VERSION Maintainer: Damian Conway <[EMAIL PROTECTED]> Date: 4 August 2000 Version: 1.00 Mailing List: [EMAIL PROTECTED] Number: 25 =head1 ABSTRACT This RFC proposes that multiway comparisons such as: if ( 0 <