associative arrays: iteration is finally here
Leandro Lucarella
llucax at gmail.com
Thu Oct 29 16:19:04 PDT 2009
Simen Kjaeraas, el 29 de octubre a las 22:06 me escribiste:
> bearophile <bearophileHUGS at lycos.com> wrote:
>
> >In nothrow functions you can use a different method, like
> >"discard" (or a similar name less intuitive than remove), that's
> >like remove, but it doesn't throw and just returns false when the
> >key was absent.
> >The idea is to use the safer method by default and the less safe
> >one as a performance optimization (or where you are sure you want
> >that semantics) in the other places.
>
> Please elucidate, what is unsafe about deleting something that isn't there?
A leak, if the key was wrong (not if the key was right but deleted
before).
--
Leandro Lucarella (AKA luca) http://llucax.com.ar/
----------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------
Soñé que tenia un caballo
Que me trataba mejor que vos
Tenia tan buena onda con ella
Era mi yegua, mucho mas que vos
More information about the Digitalmars-d
mailing list