On Mon, 28 Jun 2010 08:13:21 -0700
"Patrick R. Michaud via RT" wrote:
> For a wide variety of reasons, Rakudo currently implements Bool as a
> fundamental type rather than an enumeration. As such, Bool.pick is
> acting the same as if one had written "Int.pick" or "Num.pick" -- it's
> treating t
I didn't misunderstand. I just find it confusing that $foo.pick
returns $foo when $foo isn't a collection. It's logical but
surprising, orthogonal instead of diagonal. I'd rather see .pick fail
for non-collections.
I get that Bool.pick is supposed to work either way.
On Tuesday, June 29, 2010,
On Mon Jun 28 11:38:07 2010, markjreed wrote:
> That is terribly confusing. I'm tempted to argue for .pick not being
> defined on scalar values.
>
> Do any of the other non-Enumerated types besides Bool have a finite
> range? I'd say .pick should return an appropriate random value when
> applied
# New Ticket Created by lemb...@wrkhors.com
# Please include the string: [perl #76238]
# in the subject line of all future correspondence about this issue.
# http://rt.perl.org/rt3/Ticket/Display.html?id=76238 >
Using the June release:
$ perl6 --version
This compiler is built with the Parrot
That is terribly confusing. I'm tempted to argue for .pick not being
defined on scalar values.
Do any of the other non-Enumerated types besides Bool have a finite
range? I'd say .pick should return an appropriate random value when
applied to any such.
On Monday, June 28, 2010, Patrick R. Michau
On Mon Jun 28 04:49:23 2010, lemb...@wrkhors.com wrote:
> Using the June release:
>
> $ perl6 --version
> This compiler is built with the Parrot Compiler Toolkit, parrot
> revision 47640.
>
> Attempting to print some random numers via Bool.pick
> gives no output:
For a wide variety of reasons, R