State of DData
maeder at tzi.de
Thu Mar 25 19:18:50 EST 2004
Wolfgang Jeltsch wrote:
>>I vote for the current state "left bias+structure last", as the bias
>>should not matter much
> Does the bias matter at all if Eq means equality?
No, not for sets and bags. The bias matters of course for the
union/intersection of maps, since some elements of one side will be
ignored (if not the "With"-variant is used).
Since Map.insert should actually override a map entry it is left bias
(as the structure comes last).
How should Set.insert behave? I tend to replace an "equal" element and
maybe Map.insert should even update the key and not only the value only
to achieve the same behaviour of sets for bags (that are based on maps).
On the other hand Set.insert could also do nothing when an element is
already a set member. Conclusion: biasing for sets and bags should not
be documented/relied on.
More information about the Libraries