From: Hal Fulton Date: 2004-09-18T05:08:26+09:00 Subject: Re: Accessing Hash elements in sorted order? Markus wrote: > On Fri, 2004-09-17 at 12:14, Chris wrote: > >>>There has been some discussion going on whether Ruby's Hash should be >>>sorted by default on this list recently. >>> >> >>I would vote in favor of it. > > > I'd vote against, for the following reasons. > > 1. Every time it comes up the thread goes quite a while before the > advocates realize that they aren't all assuming the same sorting > order. Some are thinking "sorted by key (obviously)" while > others are thinking "sorted by order of insertion (obviously)" > and still others are thinking "sorted by value" or "sorted by > some arbitrary key so long as it's consistent," etc. Let's distinguis between "sorted" and "ordered." If it's ordered, you can sort it however you like. Hal