A quote from Chapter 20 (on memory representation of values) of “Real World OCaml”:
polymorphic variants must adopt a more flexible uniform memory representation, since they may be reused in a different context across compilation units.
Also a quote from this website:
Unlike constructed values, polymorphic variant values taking several arguments are not flattened. That is, ‘VConstr( v , v’ ) is represented by a block of size 2, whose field number 1 contains the representation of the pair ( v , v’ ), rather than a block of size 3 containing v and v’ in fields 1 and 2.
I don’t quite understand why this must be the case. Could anyone offer an example of what might go wrong if polymorphic variants always “inline” its fields into its block?