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

Re: reduce metaoperator on an empty list

Thread Previous | Thread Next
From:
Larry Wall
Date:
June 8, 2005 11:05
Subject:
Re: reduce metaoperator on an empty list
Message ID:
20050608180547.GC27179@wall.org
On Tue, Jun 07, 2005 at 10:52:55PM +0000, Luke Palmer wrote:
: Okay, I was referring more to the implementation.  How do we tell apart:
: 
:     3 < 4 <= 5 == 5
: 
: From
: 
:     3 lt 4 >= 5 != 5
: 
: ?

As long as the actual arguments aren't allowed to be lazy/thunky/iteratey,
they can just be evaluated pairwise like normal.  That does imply some
kind of temporary storage for

    3 < =$IN < 5

so that it only reads =$IN once.

Larry

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