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.

--
Alex
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to