On Sun, May 31, 2009 at 12:10 PM, Eero Saynatkari
<ruby-ml / kittensoft.org> wrote:
[deletia]
>> I've attached a couple of patches against hash.c to fix minor documentation
>> typos. The 7th is an attempt to fix the verbiage regarding the ordering of
>> hashes which states "The order in which you traverse a hash by either key or
>> value may seem arbitrary, and will generally not be in the insertion order."
>> This contradicts the doc/NEWS-1.9.1 file which, correctly, explains "Hash
>> preserves order. It enumerates its elements in the order in which the keys are
>> inserted." I've tried to use the latter wording as much as possible in my
>> suggested modification.
>
> The wording should maybe *not* be changed? Even though I
> have no doubt that everyone and their mothers will rely on
> insertion order in the future, it is specified that it is
> implementation-specific behaviour. (In my mind, using it
> implies Hash being the wrong data structure, but that is
> naturally debatable.)

It was my impression that hashes preserving insertion order was
considered a feature, as opposed to an implementation detail, so we
probably need clarification on this point.

> Of course, if we view the RDoc as strictly applying to MRI
> only, it is fine to change...a small mention of possible
> unportability is OK in that case. But I am not sure if it
> is feasible to make that assumption.

I hadn't considered that as being an aim for the RDoc. Again, we need
clarification, I suppose.

Regardless, even if new wording is not added to describe the new
ordering, do we agree that we cannot continue to describe "the order
in which you traverse a hash" as "arbitrary" and "generally
not...in...insertion order."? :-)

-- 
Run Paint Run Run