From: jmichel@... (Jean Michel) Date: 2001-02-20T00:10:03+09:00 Subject: [ruby-talk:11102] Re: Summary: RCR #U002 - proper new name fo r indexes >David Alan Black added: > >> (i) Hash#values_for, Array#elements_at > >My vote(s) go for choice i, or if in the end game it's considered too long, >I'd revert to > > (j) Hash#values, Array#elements I like to consider an array conceptually as a special case of hash where the keys are restricted to be positive integers. So I am very opposed to choices which make them differ more than necessary (in the spirit of matju's mixins, one could write a mixin to encapsulate some common functionality between hashes and arrays, that is, if one keeps common names), and so I vote for one of: >> > (a) Hash#values, Array#values >> > (b) Hash#values_for, Array#values_for >> > (g) Hash#selections, Array#selections >> > (h) Hash#collect_indexes, Array#collect_indexes >> > (f) Hash#subset, Array#subset I am against (f) because for me a subset is a special case of an array where: - values are not duplicated (otherwise you have a multi-set) - the ordering of the values does not matter. Because of that I would choose sorted arrays without duplicated values to represent sets. For conciseness then (a) or (b) would be my preference. Best regards, Jean Michel