On Aug 1, 2008, at 2:40 PM, Thomas Enebo wrote:

> Actually 'sample(n=1)' seems like it make a lot more sense than  
> 'choice' (if you assume that it is useful that Array has this method  
> in the first place).  sampling data is a pretty common phrase.

The problem I have with this is that sample returns an array of  
elements.  I have occasionally run into the need for a single random  
element of the array.  I have never run into the problem of needing  
multiple samples.  I think the multiple sample solution solves a  
problem even rarer that the original single problem of a single random  
element (and still doesn't supply a direct solution for that).[1]

Of course, I'm only talking about my own experience.  Take that with a  
grain of salt.

-- 
-- Jim Weirich
-- jim.weirich / gmail.com

[1] Yes, I know you can do arr.sample.first.  Blech.[2]

[2] And if anyone suggests that sample(1) should return a single  
element and sample(2) should return an array, I will ... Well, I don't  
know what I'll do.  But it won't be pretty.