Is IdentityDictionary>>keyAtValue:ifAbsent: correct?
Ned Konz
ned at bike-nomad.com
Fri Aug 2 15:46:58 UTC 2002
Why is this method set up to use identity on the *value*?
I thought we were just concerned about *key* identity...
keyAtValue: value ifAbsent: exceptionBlock
"Answer the key that is the external name for the argument, value. If
there is none, answer the result of evaluating exceptionBlock."
self associationsDo:
[:association | value == association value ifTrue: [^ association
key]].
^ exceptionBlock value
It seems to me that this method should be removed (thereby using the
DIctionary version that uses #= instead).
Am I thinking correctly, or is there some reason that this must be
this way?
Thanks,
--
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE
More information about the Squeak-dev
mailing list
|