[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Various comments

This page is part of the web mail archives of SRFI 44 from before July 7th, 2015. The new archives for SRFI 44 contain all messages, not just those from before July 7th, 2015.

+---------- On May 1, scgmille@xxxxxxxxxxxxxxxxxx said:
> The short answer is that while an iterator can easily be functional and
> efficient (because it usually only needs a small amount of state, like a
> pointer), a datastructure may not be.  Take as an example an actively
> balanced tree.  A functional version of remove may have to do a lot of
> work to modify the tree, but even more if its not allowed to affect the
> original (possibly as bad as copying the entire tree).  At best this
> creates a lot of extra GC pressure.

Having only functional iterators creates often-needless GC pressure.
Please add iterator-next! so we can iterate over our collections without
undue consing.