On 05/26/2010 04:44 AM, bearophile wrote:
Andrei A.:

I hope to work with ranges only.<

Programming life is complex, you can't fit all of it in one schema
("A foolish consistency is the hobgoblin of little minds").


Will look into it, sounds like an implementation matter.<

Yes, right. But to implement this idea the foreach() has to change a
bit, to set the flag in nonrelease mode. If implemented this idea
lessens a bit the need for the stable ("soft") methods.


Probably some trees could save some state if they exploit O(log n)
length.<

In general a length can be O(n) if for example you want to compute it
on a linked list that doesn't keep the number of items inserted. Are
you going to just not give a length attribute for such linked lists
(so users have to use something like walkLength)?

Correct, some collections (notably SList) will simply not provide length().

In fact I will implement SList soon as an illustration of the design.

Andrei

Reply via email to