delete hash[key] deprecated???
Koroskin Denis
2korden+dmd at gmail.com
Sat Jul 19 09:09:50 PDT 2008
On Sat, 19 Jul 2008 19:25:15 +0400, Stewart Gordon <smjg_1998 at yahoo.com>
wrote:
> "Koroskin Denis" <2korden+dmd at gmail.com> wrote in message
> news:op.uejmwq0sn8fdl4 at korden...
>> I think returning null is ok. Otherwise a redundant check and a lookup
>> will be necessary:
>
> What if the value type has no null?
>
Hmm.. I missed that. At first, I though than remove() behaviour should be
consistent with opIn(), i.e. it should return a pointer to a value, but it
is not possible.
Looks like the best guess is to return the stored value or T.init, if no
value is found (i.e. null for ref types and some default value for value
types).
More information about the Digitalmars-d-learn
mailing list