On Mon, 25 Sep 2000 17:18:56 +1100 (EST), Damian Conway wrote:

>Since no-one has put their hand up to take this RFC over, I am now
>intending to retract it. I simply don't have the time to try and
>find a solution to the many (valid) problems that have been pointed out.
>
>I would heartily encourage anyone who wants to take on this monster
>to steal whatever they feel is worthwhile from this now-defunct proposal.

I am not porposing to take this over. Frankly, I don't care enough,
because I don't ever use "each". But I had written a reply, of which I'm
not use if I ever sent it. In this, I proposed to give each a lexical
scope, possibly optional. That way, even if you do recursion in a
function that uses each, you'd get a *different* iterator for every time
you come across it. Would that solve your problem? I think it could.

As for the "possibly optional" lexical scoping: the next syntax is a bit
ugly, but it shows some potential:

        while(my($key, $value) = my each %hash) { ... }
                                 ^^

-- 
        Bart.

Reply via email to