On 22 December 2012 19:53, Chris Muller <
[hidden email]> wrote:
> This following assertion fails.
>
> |d1 d2 | d1:=Dictionary new. d2:=Dictionary new.
> d1 at: 'one' put: 1. d2 at: 'two' put: 2.
> d1 addAll: d2.
> d2 at: 'two' put: nil.
> self assert: (d1 at: 'two')=2
>
> To me it seems like Associations should not be shared between
> Dictionary's. Thoughts?
Associations should not be shared between Dictionaries. That kind of
sharing works well with immutable data structures, but Dictionary is
mutable. Thus, the sharing can cause things distant in space and time
to influence each other's behaviour, which would make for an
unpleasant debugging session.
frank