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, 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 the invocant as a list of one element and then returning the
type object directly.  And Bool as a type object always returns false
because it is undefined.

For now, the workaround is to do (False,True).pick until we can properly
implement .pick on enumerations, and figure out how to turn Bool into
one (or convince the specification that Bool is not really an
enumeration :-).

Pm

Reply via email to