dblack / candle.superlink.net wrote:
> Hi --
> 
> On Fri, 20 Sep 2002, Yukihiro Matsumoto wrote:
> 
> 
>>Hi,
>>
>>In message "Re: select and select"
>>    on 02/09/20, dblack / candle.superlink.net <dblack / candle.superlink.net> writes:
>>
>>|Maybe it would seem a better fit if the two were combined?
>>
>>|  arr.select {|s| s == "c"}           # ["c"]
>>|  arr.select(0,2,4)                   # ["a", "c", "e"]
>>|  arr.select(0,2,4) { |s| s == "c" }  # ["c"]
>>
>>Hmm, from this combination,
>>
>>  arr.select {|s| s == "c"}
>>
>>can be considered as
>>
>>  arr.select() {|s| s == "c"}
>>
>>i.e.
>>
>>  arr.select(*[]) {|s| s == "c"}        # [] ???
>>
>>Of course, current behavior has this too, but would combination
>>emphasize wierdness?
> 
> 
> Good question.  I guess the arguments to select defaults to *(0...size),
> which might be kind of weird.  Or one could say that the arguments to
> select are constraints on the selection, and that in the absence of
> such constraints, everything is selected.
> 
> 
>>|I think I would still like this better:
>>|
>>|  arr.at(0,2,4).select { |s| s == "c" }
>>
>>I admit this is better in some aspect.
>>
>>Does "at" takes multiple placement make you feel natural?
>>And is this natural for Hashes?
> 
> 
> For Arrays I do like at(x,y,z).  It seems natural to me.  For Hashes,
> I don't think I usually refer to a value as being "at" a key... but it
> sounds sort of right.

Just to throw in my two cents... Using at() definitely feels better to 
me. :)

Julian

-- 
julian / beta4.com
Beta4 Productions (http://www.beta4.com)