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
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
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
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 )
> "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,
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.
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
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
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
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
> > > 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
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 )
> > 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,
> 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
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
=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 <
16 matches
Mail list logo