[#18121] [Ruby 1.8.7 - Bug #405] (Open) ssl.rb:31: [BUG] Bus Error — Anonymous <redmine@...>

Issue #405 has been reported by Anonymous.

14 messages 2008/08/04

[#18130] Re: New array methods cycle, choice, shuffle (plus bug in cycle) — Brian Candler <B.Candler@...>

> Seriously though... Array.first is a noun.

10 messages 2008/08/05

[#18319] NEW Command: absolute_path() -- — "C.E. Thornton" <admin@...>

Core,

14 messages 2008/08/16
[#18321] Re: NEW Command: absolute_path() -- — Yukihiro Matsumoto <matz@...> 2008/08/18

Hi,

[#18381] [Bug #496] DRb.start_service(nil) is very slow — Hongli Lai <redmine@...>

Bug #496: DRb.start_service(nil) is very slow

11 messages 2008/08/25

[ruby-core:18046] Re: New array methods cycle, choice, shuffle (plus bug in cycle)

From: Michael Neumann <mneumann@...>
Date: 2008-08-01 07:28:35 UTC
List: ruby-core #18046
Gregory Brown wrote:
> On Thu, Jul 31, 2008 at 7:50 PM, Yukihiro Matsumoto <matz@ruby-lang.org> wrote:
>> Hi,
>>
>> In message "Re: [ruby-core:18036] Re: New array methods cycle, choice, shuffle (plus bug in cycle)"
>>    on Fri, 1 Aug 2008 08:33:15 +0900, Charles Oliver Nutter <charles.nutter@sun.com> writes:
>>
>> |choice is a noun. choose, map, select, collect, etc are imperative
>> |verbs. So choose much more consistent with the others. Also, choice
>> |implies to me that it's already been made...since you can't have a
>> |choice unless you've already made a "choice". In essence, a "choice" is
>> |the product of "choosing" something. So ary.choose produces a choice.
>>
>> Interestingly Python chose "choice" for the method.  Does anyone have
>> any additional info?
> 
> If feel like this sort of makes sense:
> 
> a = [1,2,3].choose
> 
> a is some element of [1,2,3] that Array has chosen for me.
> 
> But in my mind,
> 
> a = [1,2,3].choice

For me as a non-native English speaker, #choice is clearer.
For me, #choose implies that *I* have to choose something, i.e. I would
expect that method #choose has a parameter, which it doesn't have.
Whereas #choice implies, that I have no choice, which is in some sense
true for this method, because I can't choose the element I want.

So in contrast to Charles, I think, ary.choice produces a choose
operation internally :)

> Doesn't seem very clear.   Mostly for the same reasons Charlie suggested.
> 
> I still think
> 
> a = [1,2,3].rand

Yes, I like this even more.

Regards,

   Michael


In This Thread