From: David Masover Date: 2009-02-14T05:29:15+09:00 Subject: Re: If you are unhappy with the direction of Ruby 1.8.7+, respond Phlip wrote: > Ruby uses option-hashes as an emergent "named parameters" system. We > have hundreds of DSLs written with them. Granted. > After these DSLs can see the order that the user-programmer wrote the > parameters, they are free to use this order to grow more powerful. How so? I honestly can't think of a case where I'd want to do that. If I wanted positional arguments, I'd use them. If I want named arguments, why do I care about their position? > Just because one (technological) implementation of hash tables throws > information away, that does not mean it was _required_ to throw that > info away. No, but it's very likely more efficient to do so, and the vast majority of hashes simply do not need that information. > How about we give you your own special version, > HashWithIndifferentOrder, that guarantees it randomizes key order? Because most hashes don't need them? There are several OrderedHash implementations, some of them quite old, if you really want to depend on hash ordering. > And along the way, we can give you := for assignment, and = to test > equality, because - you know - the = operator has always meant > equality, not assignment. Ew. I see your point, but I find I do a lot more assignments than tests for equality, so I prefer less typing for that. Also not sure what this has to do with the other discussion...