[Haskell] Re: [Haskell-cafe] Why functional programming matters

Alex Young alex at blackkettle.org
Sun Jan 27 05:37:25 EST 2008

Isaac Dupree wrote:
> Derek Elkins wrote:
>> and you can have
>> unboxed values in dynamically typed languages.
> really? Sure that's possible as an optimization, but I thought that to 
> explicitly specify that would require a known static type.  Or perhaps 
> the bit-"tagging" by which some Scheme implementations are able to hold 
> small integers without a pointer (IIRC)?
That's exactly what Ruby does - symbols, Fixnums (integers that fit into 
a single machine word), bools and nil are unboxed, distinguished from 
boxed types by the lowest 2 bits.  That's undistinguishable at runtime, 
though - everything Just Works as though they're ordinary objects, 
including flipping integer class to Bignum (which is boxed) as necessary.


More information about the Haskell-Cafe mailing list