bearophileHUGS at lycos.com
Wed May 26 02:44:30 PDT 2010
>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)?
More information about the Digitalmars-d