[perl #61286] [PATCH][PROPOSAL] box complements

Will Coleda via RT parrotbug-followup at parrotcode.org
Thu Dec 11 14:19:14 UTC 2008


On Thu Dec 11 01:51:23 2008, fperrad wrote:
> The new opcode 'box' is limited by its 3 signatures that target Float,
> Integer & String.
> I propose the 3 following new opcodes :

>  - true
>  - false

These can be approximated with:

$P0 = box 1
$P0 = box 0

I know you'll end up with an Integer (or, perhaps, a LuaInt) instead of 
a Boolean here. That doesn't work?

>  - undef or nil (less Perlish)

undef and null are two different things in parrot, but we do have an 
opcode for one of them, at least:

$P0 = null

> After some experiments with bytecode translation,
> in WMLScript (r33655) and in Lua (r33760),
> it seems obvious that we need them.

Can you explain why?

> François.


-- 
Will "Coke" Coleda


More information about the parrot-dev mailing list