interators Per Bothner (29 Apr 2003 05:14 UTC)
Re: iterators [was: interators] Per Bothner (29 Apr 2003 05:29 UTC)
Re: interators scgmille@xxxxxx (29 Apr 2003 20:00 UTC)
Re: iterators Per Bothner (29 Apr 2003 20:45 UTC)
Re: iterators scgmille@xxxxxx (29 Apr 2003 21:36 UTC)

Re: iterators Per Bothner 29 Apr 2003 20:46 UTC

xxxxxx@freenetproject.org wrote:
> Well, they are still iterators, the difference is that instead of an
> iterator object which is mutated as in other languages, we behave
> functionally, returning a new state object from iterator-next.

My question is: is the word "iterator" common for this kind
of non-mutable iterator?  If not, perhaps another name, like
"position" might be better.  "cursor" is another possibility.

One problem with the proposed model is that it requires *three*
function calls for each iteration - and they all have relatively
long names.  This cries out for a macro to make iteration less
verbose.  (There are also performance implications of using three
calls per iteration.)
--
	--Per Bothner
xxxxxx@bothner.com   http://per.bothner.com/