Am Dienstag, 3. April 2007 06:56 schrieb Allison Randal:
> > The major problem is probably, that there are no specific iterator
> > interface vtable functions that an iterator would use.
>
> Isn't that what nextkey_keyed is for? Though, looking at it, it seems
> more like part of the problem of entanglement than part of the solution.

Yep. I should of course have mentioned C<nextkey_keyed()>. But it's not 
sufficient for an interface. There's also C<get_iter()>, which returns a new 
iterator for the aggregate/string, which is probably ok.

The main problem is C<nextkey_keyed()>:
- you sometimes want to specify iteration direction backwards (arrays) [1]
- you sometimes want to retrieve keys (hash) or values (array) or maybe both 
(hash.each)

And the iterator should be able to iterate over all possible thingies like 
slices or lazy PMCs by using just one specified interface.

leo

[1] this might probably be stated during iterater creation

Reply via email to