RubyChangeRequest #U002: new proper nameforHash#indexes, Array#indexes 
Author Message
 RubyChangeRequest #U002: new proper nameforHash#indexes, Array#indexes

Quote:


>|Extending Hash#values to accept a list of keys
>|still seems best to me.

>Hash#values sounds good to me too.
>How about Array?  Array#values?

Array#values is fine with me. It's a bit odd that
a.values( ) would return...a copy of the selfsame
array. Oh, well.

Quote:
>And how do you think about extending Hash#keys too?
>Or extending Hash#index/Array#index to accept multiple arguments?

If Array#index and Hash#index accept multiple
arguments, then they should be called
#indexes...whoops, that's what started all this.

Um, I guess extending Hash#keys makes sense,
although I'm not sure how critical that feature
is. It sure would be nice to have a corresponding
method for Array, but I can't think of a good
name.

Kevin



Tue, 05 Aug 2003 12:38:08 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. RubyChangeRequest #U002: new proper namefor Hash#indexes, Array#indexes

2. Summary: RCR #U002 - proper new name fo r indexes

3. RubyChangeRequest #U002

4. finding 1d index in 2d array of indices

5. Index Values of an Array inside a Cluster inside an Array

6. array as index to array

7. how to access arrays with variable for array names and index

8. Dynamic index and indexed variables

9. HELP ! corrupted index (in index key)

10. CDX Index file bloats up but shrink after re-indexing

11. Why INDEX ON &INDEX->FIEL

12. Hash#index !==> Hash#indexes

 

 
Powered by phpBB® Forum Software