[#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:18047] Re: New array methods cycle, choice, shuffle (plus bug in cycle)

From: "Vladimir Sizikov" <vsizikov@...>
Date: 2008-08-01 08:32:44 UTC
List: ruby-core #18047
Hi Charles, Matz, folks,

Let me join the fun with the following 4 notes:

1. Both #choice and #choose are not very clear names to begin with:

   a) #choice - what choice, what's the rule to choose, who choose for me?
   b) #choose - is that similar to #select? Can I supply the block? And this is
       confusing: #choose and #select seems to be similar/same methods,
       but they do very different things, not related to each other at all. One
       *have* to remember/check docs every time one of them is to be used,
       which one is which.

2. We're selecting the random element from the array, hence that should
be reflected in the method name:

   a) #random (a noun, in a style similar to #first, #last). Much
clearer than #choice.
   b) #take_random (a verb, in a style similar to #take, #take_while).

3. Is that the common operation to even bother to include that in the
Array API? :)
    In my 15 years of writing code I have never used a random pick
from an array.
    But maybe that's just me and everybody else use it all the time? ;)
    Array has more than 80 methods already, why do we need this one, which is
   user very rarely (as far as I can tell) and which could be written
in a single line
   in those cases when it's needed?

4. The Array#choice has been shipped as part of stable MRI 1.8.7 already, so
   if we are to rename/remove it, that'll break the compatibility.

Thanks,
  --Vladimir

On Fri, Aug 1, 2008 at 1:50 AM, 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?
>
>                                                        matz.
>
>

In This Thread