develooper Front page | perl.perl5.porters | Postings from November 2012

Re: [perl #30123] foreach ("", "a".."zzzzzz") confuses range optimizer

Thread Previous | Thread Next
Leon Timmermans
November 24, 2012 08:09
Re: [perl #30123] foreach ("", "a".."zzzzzz") confuses range optimizer
Message ID:
On Sat, Nov 24, 2012 at 4:34 PM, Father Chrysostomos via RT
<> wrote:
>> Is there anything blocking this from happening, or just the usual (time,
>> effort, tuits)?
> The usual, plus lack of inspiration.
>> Is there any other case besides for/foreach that 'a..z' should iterate on
>> the fly rather than immediately generate a list in memory?
> I hadn’t thought of that, but if it could iterate on the fly in more
> places it would allow for more idiomatic code.

It would be awesome if we had real lazy lists, but that would require
coroutines first (which is known to be doable, but has many
edge-cases, in particular dynamic scoping ones). Some kind of internal
generator would be a good start though, but would still be


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About