Re: [Mono-dev] FW: [Bug 349875] DictionaryTKey, TValue stores values out of order.
I recall reading somewhere that when possible, mono will try to mimic the behavior of .Net, to make it easier for people to migrate from the later to the former. I can't find that reference now, so maybe it's all in my head. :) -Original Message- From: Juraj Skripsky [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 19, 2007 2:17 PM To: Josh Mouch Cc: mono-devel-list@lists.ximian.com Subject: Re: FW: [Bug 349875] DictionaryTKey, TValue stores values out of order. Hi Josh, Mono is support to follow the MS .net _design_ not the _implementation_. If the docs don't state that you can depend on the order of the elements, you shouldn't do so. I consider an app relying on this order to be buggy. - Juraj PS: please always send a copy of such mails to the mailing lists. Others might be interested. On Wed, 2007-12-19 at 14:09 -0500, Josh Mouch wrote: Isn't mono supposed to mimic MS .Net behavior? Josh -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 19, 2007 2:07 PM To: [EMAIL PROTECTED] Subject: [Bug 349875] DictionaryTKey, TValue stores values out of order. https://bugzilla.novell.com/show_bug.cgi?id=349875 User [EMAIL PROTECTED] added comment https://bugzilla.novell.com/show_bug.cgi?id=349875#c1 Juraj Skripsky [EMAIL PROTECTED] changed: What|Removed |Added CC| |[EMAIL PROTECTED] Status|NEW |RESOLVED Resolution| |INVALID --- Comment #1 from Juraj Skripsky [EMAIL PROTECTED] 2007-12-19 12:06:33 MST --- According to MS.NET docs, this behavior is perfectly fine for the Values property (see http://msdn2.microsoft.com/en-us/library/ekcfxy3x.aspx): The order of the values in the Dictionary(Of (TKey, TValue))..::.ValueCollection is unspecified, but it is the same order as the associated keys in the Dictionary(Of (TKey, TValue))..::.KeyCollection returned by the Keys property. As for the enumeration of the Dictionary'2 itself, the documentation does not state a required ordering of the returned elements. Setting to resolved/fixed. Please reopen if the docs support your claim. ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] FW: [Bug 349875] DictionaryTKey, TValue stores values out of order.
Hi, We do try to mimic MS behaviour but this case is hard to solve, as what seems to be the MS behaviour is probably just an accident due to their implementation of GetHashCode. Zoltan On Dec 19, 2007 8:40 PM, Josh Mouch [EMAIL PROTECTED] wrote: I recall reading somewhere that when possible, mono will try to mimic the behavior of .Net, to make it easier for people to migrate from the later to the former. I can't find that reference now, so maybe it's all in my head. :) -Original Message- From: Juraj Skripsky [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 19, 2007 2:17 PM To: Josh Mouch Cc: mono-devel-list@lists.ximian.com Subject: Re: FW: [Bug 349875] DictionaryTKey, TValue stores values out of order. Hi Josh, Mono is support to follow the MS .net _design_ not the _implementation_. If the docs don't state that you can depend on the order of the elements, you shouldn't do so. I consider an app relying on this order to be buggy. - Juraj PS: please always send a copy of such mails to the mailing lists. Others might be interested. On Wed, 2007-12-19 at 14:09 -0500, Josh Mouch wrote: Isn't mono supposed to mimic MS .Net behavior? Josh -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 19, 2007 2:07 PM To: [EMAIL PROTECTED] Subject: [Bug 349875] DictionaryTKey, TValue stores values out of order. https://bugzilla.novell.com/show_bug.cgi?id=349875 User [EMAIL PROTECTED] added comment https://bugzilla.novell.com/show_bug.cgi?id=349875#c1 Juraj Skripsky [EMAIL PROTECTED] changed: What|Removed |Added CC| |[EMAIL PROTECTED] Status|NEW |RESOLVED Resolution| |INVALID --- Comment #1 from Juraj Skripsky [EMAIL PROTECTED] 2007-12-19 12:06:33 MST --- According to MS.NET docs, this behavior is perfectly fine for the Values property (see http://msdn2.microsoft.com/en-us/library/ekcfxy3x.aspx): The order of the values in the Dictionary(Of (TKey, TValue))..::.ValueCollection is unspecified, but it is the same order as the associated keys in the Dictionary(Of (TKey, TValue))..::.KeyCollection returned by the Keys property. As for the enumeration of the Dictionary'2 itself, the documentation does not state a required ordering of the returned elements. Setting to resolved/fixed. Please reopen if the docs support your claim. ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] FW: [Bug 349875] DictionaryTKey, TValue stores values out of order.
Hi Josh, Mono is support to follow the MS .net _design_ not the _implementation_. If the docs don't state that you can depend on the order of the elements, you shouldn't do so. I consider an app relying on this order to be buggy. - Juraj PS: please always send a copy of such mails to the mailing lists. Others might be interested. On Wed, 2007-12-19 at 14:09 -0500, Josh Mouch wrote: Isn't mono supposed to mimic MS .Net behavior? Josh -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 19, 2007 2:07 PM To: [EMAIL PROTECTED] Subject: [Bug 349875] DictionaryTKey, TValue stores values out of order. https://bugzilla.novell.com/show_bug.cgi?id=349875 User [EMAIL PROTECTED] added comment https://bugzilla.novell.com/show_bug.cgi?id=349875#c1 Juraj Skripsky [EMAIL PROTECTED] changed: What|Removed |Added CC||[EMAIL PROTECTED] Status|NEW |RESOLVED Resolution||INVALID --- Comment #1 from Juraj Skripsky [EMAIL PROTECTED] 2007-12-19 12:06:33 MST --- According to MS.NET docs, this behavior is perfectly fine for the Values property (see http://msdn2.microsoft.com/en-us/library/ekcfxy3x.aspx): The order of the values in the Dictionary(Of (TKey, TValue))..::.ValueCollection is unspecified, but it is the same order as the associated keys in the Dictionary(Of (TKey, TValue))..::.KeyCollection returned by the Keys property. As for the enumeration of the Dictionary'2 itself, the documentation does not state a required ordering of the returned elements. Setting to resolved/fixed. Please reopen if the docs support your claim. ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] FW: [Bug 349875] DictionaryTKey, TValue stores values out of order.
You're right, it's just the definition of (specified) behavior that we don't agree on. MS left out any ordering guarantees for Dictionary'2 on purpose. Specifying an order would have opened a very nasty can of worms. What would be the expected order after adding the keys 1, 2, 3, then removing 2 and then adding 4? 1-3-4 or 1-4-3? Thanks anyway for filling the bug report! Even if it wasn't really a bug, it's good to have as many people as possible testing and questioning the correctness of Mono. - Juraj On Wed, 2007-12-19 at 14:40 -0500, Josh Mouch wrote: I recall reading somewhere that when possible, mono will try to mimic the behavior of .Net, to make it easier for people to migrate from the later to the former. I can't find that reference now, so maybe it's all in my head. :) -Original Message- From: Juraj Skripsky [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 19, 2007 2:17 PM To: Josh Mouch Cc: mono-devel-list@lists.ximian.com Subject: Re: FW: [Bug 349875] DictionaryTKey, TValue stores values out of order. Hi Josh, Mono is support to follow the MS .net _design_ not the _implementation_. If the docs don't state that you can depend on the order of the elements, you shouldn't do so. I consider an app relying on this order to be buggy. - Juraj PS: please always send a copy of such mails to the mailing lists. Others might be interested. On Wed, 2007-12-19 at 14:09 -0500, Josh Mouch wrote: Isn't mono supposed to mimic MS .Net behavior? Josh -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 19, 2007 2:07 PM To: [EMAIL PROTECTED] Subject: [Bug 349875] DictionaryTKey, TValue stores values out of order. https://bugzilla.novell.com/show_bug.cgi?id=349875 User [EMAIL PROTECTED] added comment https://bugzilla.novell.com/show_bug.cgi?id=349875#c1 Juraj Skripsky [EMAIL PROTECTED] changed: What|Removed |Added CC| |[EMAIL PROTECTED] Status|NEW |RESOLVED Resolution| |INVALID --- Comment #1 from Juraj Skripsky [EMAIL PROTECTED] 2007-12-19 12:06:33 MST --- According to MS.NET docs, this behavior is perfectly fine for the Values property (see http://msdn2.microsoft.com/en-us/library/ekcfxy3x.aspx): The order of the values in the Dictionary(Of (TKey, TValue))..::.ValueCollection is unspecified, but it is the same order as the associated keys in the Dictionary(Of (TKey, TValue))..::.KeyCollection returned by the Keys property. As for the enumeration of the Dictionary'2 itself, the documentation does not state a required ordering of the returned elements. Setting to resolved/fixed. Please reopen if the docs support your claim. ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] FW: [Bug 349875] DictionaryTKey, TValue stores values out of order.
Shouldn't the stack order always be first in first out? So with your example 1-2-3, remove 2, add 4, you would end up with 1-3-4. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Juraj Skripsky Sent: Wednesday, December 19, 2007 1:54 PM To: Josh Mouch Cc: mono-devel-list@lists.ximian.com Subject: Re: [Mono-dev] FW: [Bug 349875] DictionaryTKey,TValue stores values out of order. You're right, it's just the definition of (specified) behavior that we don't agree on. MS left out any ordering guarantees for Dictionary'2 on purpose. Specifying an order would have opened a very nasty can of worms. What would be the expected order after adding the keys 1, 2, 3, then removing 2 and then adding 4? 1-3-4 or 1-4-3? Thanks anyway for filling the bug report! Even if it wasn't really a bug, it's good to have as many people as possible testing and questioning the correctness of Mono. - Juraj On Wed, 2007-12-19 at 14:40 -0500, Josh Mouch wrote: I recall reading somewhere that when possible, mono will try to mimic the behavior of .Net, to make it easier for people to migrate from the later to the former. I can't find that reference now, so maybe it's all in my head. :) -Original Message- From: Juraj Skripsky [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 19, 2007 2:17 PM To: Josh Mouch Cc: mono-devel-list@lists.ximian.com Subject: Re: FW: [Bug 349875] DictionaryTKey, TValue stores values out of order. Hi Josh, Mono is support to follow the MS .net _design_ not the _implementation_. If the docs don't state that you can depend on the order of the elements, you shouldn't do so. I consider an app relying on this order to be buggy. - Juraj PS: please always send a copy of such mails to the mailing lists. Others might be interested. On Wed, 2007-12-19 at 14:09 -0500, Josh Mouch wrote: Isn't mono supposed to mimic MS .Net behavior? Josh -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 19, 2007 2:07 PM To: [EMAIL PROTECTED] Subject: [Bug 349875] DictionaryTKey, TValue stores values out of order. https://bugzilla.novell.com/show_bug.cgi?id=349875 User [EMAIL PROTECTED] added comment https://bugzilla.novell.com/show_bug.cgi?id=349875#c1 Juraj Skripsky [EMAIL PROTECTED] changed: What|Removed |Added -- -- CC| |[EMAIL PROTECTED] Status|NEW |RESOLVED Resolution| |INVALID --- Comment #1 from Juraj Skripsky [EMAIL PROTECTED] 2007-12-19 12:06:33 MST --- According to MS.NET docs, this behavior is perfectly fine for the Values property (see http://msdn2.microsoft.com/en-us/library/ekcfxy3x.aspx): The order of the values in the Dictionary(Of (TKey, TValue))..::.ValueCollection is unspecified, but it is the same TValueorder as the associated keys in the Dictionary(Of (TKey, TValue))..::.KeyCollection returned by the Keys property. As for the enumeration of the Dictionary'2 itself, the documentation does not state a required ordering of the returned elements. Setting to resolved/fixed. Please reopen if the docs support your claim. ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list