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

[email protected] (chromatic)
Newsgroups perl.perl6.internals,perl.perl6.internals
Organization Snafu
Message-ID <[email protected]>
On Thursday 11 December 2008 08:20:06 Will Coleda wrote:

> As I understand it, box is designed to deal /only/ with promoting the
> 3 basic register types (SIN) to PMCs of the appropriate HLL type (just
> like autoboxing in PCC), not to provide a way to promote literal
> values for arbitrary core PMCs. So the discontinuity is that not every
> core PMC has a corresponding register type.

Yes.

> I think a more general approach might be to have an opcode that
> combined 'new' and 'assign'. You could even have it respect the HLL
> mappings if present.

If Lua has dynops, this is easy.  If Lua doesn't have dynops, this could 
easily be a function.

-- c
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.