On Sunday, 19 October 2014 at 11:56:10 UTC, bachmeier wrote:
Anything that you can do with an iterator can be done with a tail recursive function, but not vice versa, which means iterators serve no purpose.

I guess that comment was ironic, but end-begin kind of disproves it :-).

I kind of like the concept of "cursors" in databases, where you can pin-point a position in a query result and continue even after the table has changed.

For a linked list it is is easy to get "cursor semantics". Not so easy for arrays, but it should be possible to define "cursor enabled containers" with appropriate locking.

Reply via email to