[mercury-users] Tagged datatypes and boxing

Warwick Harvey wharvey at cs.monash.edu.au
Mon Sep 27 13:40:10 AEST 1999


Peter Schachte <schachte at cs.mu.OZ.AU> wrote:
> What about types involving pointers?  Here Mercury already does almost
> as well as it can, allowing 4 or 8 constructors each with at most 1
> address argument.  It could be improved a bit by allowing any number
> of nilary constructors to share a single 2 or 3 bit tag in the low
> bits, and then use the remaining bits to distinguish their values.

I think you'll find Mercury does this already (assuming I'm understanding 
what you're saying).  And it has done for as long as long as I've known 
about this stuff (at least a year).  Have a read of the RTTI paper for more 
details:

http://www.cs.mu.oz.au/research/mercury/information/papers/rtti_ppdp.ps.gz

Warwick

--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list