[concurrency-interest] Reference/IdentityMap toString

Tim Peierls tim at peierls.net
Fri Aug 20 10:56:03 EDT 2010


On Fri, Aug 20, 2010 at 10:20 AM, Jason Mehrens
<jason_mehrens at hotmail.com>wrote:

> ...I'm arguing that any map that doesn't use the equals contract but uses
> the AbstractMap.toString is broken.  The reason is that map containment is
> determined by the equivalence relationship and AbstractMap.toString lists
> what is contained in the map.  Therefore, the string representation of a
> map must accurately describe the equivalence relationship, otherwise the
> string representation is broken.
>

While bijectivity is an attractive property for a string representation
function, it's not something anyone should depend on.

--tim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20100820/083acd3d/attachment.html>


More information about the Concurrency-interest mailing list