[MLton-user] PackWord32Big is great, but no PackWord16Big

Matthew Fluet fluet@cs.cornell.edu
Sun, 7 Nov 2004 13:34:33 -0500 (EST)


> Are there plans for a PackWord16Big? or was it considered unnecessary as
> one could manually shift and/or mask and get/set a Word8Array a Word8 at
> a time?

I don't see that it would be particularly difficult to add additional
PackWord<N>{Big,Little} structures.  PackWord32{Big,Little} was of obvious
utility; the others less so.  The actual implementation is only 62 lines,
and could be further functorized to better support additional sizes.  We
would also need to add a couple of additional primitives, but again, they
would be natural generalizations of existing ones.