develooper Front page | perl.perl6.language | Postings from June 2001

Re: suggested properties of operator results

Thread Previous | Thread Next
From:
Graham Barr
Date:
June 11, 2001 05:33
Subject:
Re: suggested properties of operator results
Message ID:
20010611133136.A50444@pobox.com
On Mon, Jun 11, 2001 at 01:34:49AM -0700, Chris Hostetter wrote:
> 
> For the record, bwarnock pointed out to me that damian allready proposed
> this behavior in RFC 25...
> 
> 	http://dev.perl.org/rfc/25.html
> 
> That RFC doesn't suggest having the comparison operators set properties
> on their result -- instead it recomends that "multiple chained comparisons
> should be automagically expanded to the equivalent binary conjunction."
> ... I think I like his way better.  Mainly because I didn't consider the
> ramifications of scenerios like this...
> 
>    $input = 4;
>    $bool = $input < 22;        # $bool = 1 is valueR(22)
>    print "ok!" if $bool == 1;  # whoops, '==' is looking at $bool.valueR

Well perhaps   $input < 22   should yield  22 is true

Graham.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About