to invalidate a range
bearophile
bearophileHUGS at lycos.com
Fri Aug 12 13:13:42 PDT 2011
Ellery Newcomer:
> in std.container, the stable* container functions advocate that they do
> not invalidate the ranges of their containers. What does it mean to
> invalidate a range?
Generally modifying a collection while you iterate on it causes troubles. When you iterate on a range and you modify the range during the iteration Python gives you an error, because the "for" temporary sets boolean inside the iteratee. In D this problem was avoided in another way, using those stable functions.
Bye,
bearophile
More information about the Digitalmars-d-learn
mailing list