[Mono-devel-list] Some patches for Collection
2a5gjx302 at sneakemail.com
Thu Feb 17 16:05:46 EST 2005
At 05:45 PM 17/02/2005 +0100, Martin Baulig wrote:
>On Thu, 2005-02-17 at 09:41 -0500, Ben Maurer wrote:
>> It is broken. People rely on it in production code. So we do the trivial
>So they have to fix their code.
>Next week someone comes and relies on Equals() being in the same way
>broken, but the other way around - should we now keep changing it back
>and forth each time someone complains ?
The key point here is that while it is true that code that depends on a
particular order has design problems, mono needs to match the Microsoft
runtime's behaviour. The Microsoft runtime's behaviour is to call .Equals
repeatedly on the object passed to IndexOf(), not to call it separately on
each object in the collection.
"If mono's behaviour is different than the Microsoft runtime's behaviour,
then it is a bug in mono." As much as you may dislike the patches, this
describes this situation.
More information about the Mono-devel-list