Yotam wrote:Use static type information. When the type is known to be 'a * 'b you use
> I don't think so. Without metadata, how do you know where one tuple member
ends and another begins?
the unboxed representation. Otherwise you default to the boxed
representation.
OCaml already does this to some extent because functions that accept a tuple
are compiled to multi-argument functions (IIRC). So this would just be an
extension to handle the return value too. The same idea could be used with
many other types, e.g. unboxed optional arguments.
Cheers,
Jon.