I'd like to go about implementing [Perl]?LazyArray and LazySequence
pmcs, possibly with a TiedArray (and Infinity) in the interim.  I have
a few semantic questions, but first, here's what I have in mind:

    LazySequence:  Manages individual lazy sequences like 1..Inf (or
                     even 1..100_000)
    LazyArray:     Aggregates multiple lazy things together, along
                     with an "exceptions list" for things like:

        @a = 1..Inf;
        @a[6] = 42;

First, do these work well as pmcs, or should it be integrated with
PerlArray (I hope not)?  Should Infinity be a pmc?

Any ideas on how these things should be set up at the assembly level?
I was thinking either:

        $P0 = new LazySequence
        $P1 = new Infinity
        $P0["from"] = 0
        $P0["to"]   = $P1

or

        $P0 = new LazySequence
        $P1 = new Infinity
        find_method P0, "set_range"
        .arg 0              # Assuming imcc knows the new conventions
        .arg $P1
        invokecc

Finally, what should things like:

        set $I0, $P0        # $P0 contains 1..Inf

Because integer registers can't well store infinity...

Thanks,
Luke

Reply via email to