Project

General

Profile

Actions

Feature #5123

closed

Alias Hash 1.9 as OrderedHash

Added by alexeymuranov (Alexey Muranov) almost 11 years ago. Updated over 4 years ago.

Status:
Rejected
Priority:
Normal
Target version:
-
[ruby-core:38623]

Description

I read that it was a controversial decision to make Hash in Ruby 1.9 ordered.
It is not clear if the present implementation is the best possible.
I would like to express my thought.

It would be nice if the ordered Hash in Ruby 1.9 was aliased as OrderedHash.
That way people who rely on preserving the insertion order in some application (me, for example) could explicitly use OrderedHash, and developers of Ruby would be free to redefine Hash in future versions if a better implementation that a doubly-linked circular list is found.
(I read something about a possibility of using "red–black tree".)

Thanks.

Alexey Muranov.

Actions

Also available in: Atom PDF