4 ms·
Aren't product types just tuples, whereas arrays correspond to list types? The '^' operator can only construct arrays whose elements are of a single type, righ
by lambdaphage 14y ago
Aren't product types just tuples, whereas arrays correspond to list types? The '^' operator can only construct arrays whose elements are of a single type, right?
- Yttrill 14y agoThat's correct. However, somewhat problematically, Felix considers the tuple int * int to actually be an array int ^ 2. It's not entirely clear this "automatically applied isomorphism" is a good idea though. However it means arrays "drop out" of the notion of a tuple as a special case. Internally such arrays have a special representation which allows arrays of 100,000 values, something which could never be represented by a tuple type (and still get reasonable compile times :)