<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div><br class=""></div><div><blockquote type="cite" class=""><div class=""><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">I’m not saying that tuple member names are “true integers” (although, with Reflection…). I understood that, semantically, the reason we refer to elements .0, .1 and .2 of a tuple because that’s their name, not necessarily because its their position in the tuple. My point is that for a fixed-size array like a [3; Double] vector, because you know what to expect at each location, those indices are *both* ordinal *and* nominal. Subscripting [0] or [1] from that FSA has the same conceptual meaning as accessing .x or .y on an equivalent struct. What I’m trying to say is: for a FSA, the index *is* the member name, just like the declaration-order number is for tuples.</div></div></blockquote><div>I think one important aspect of an array is that the slots don't have a name at all...</div><br class=""><blockquote type="cite" class=""><div class=""><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">I think the difference is that, for a fixed-size Array, the absolute positions also generally have external meaning which is known to the programmer but not reflected in the type-system. For example, that a [3; Double] vector is supposed to be interpreted as (x, y, z) components, in that order.</div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""></div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">We can do better than to expose a 3-element vector as a list of 3 unlabelled values. Or even a n-dimensional matrix just as a series of numbers.</div></div></blockquote><div>I don't think we can — because a matrix <i class="">is</i> nothing but a bunch of numbers.</div><div>How would you name the elements in 600 × 2000 matrix?</div><div>Shorthands like x, y, z are only used in a very restricted environment that has little to do with real math.</div><br class=""><blockquote type="cite" class=""><div class=""><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">A better system may require meta-programming features we don’t support yet, and that’s fine, but I would really like us to focus on the actual use-cases of FSAs and to consider ways of making those great, rather than checking off a feature that we have to have ‘just because’.</div></div></blockquote><div>As I said: I don't think there is a better system, but what features should that be?</div><br class=""><blockquote type="cite" class=""><div class=""><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">I remember that in the first Swift beta, you were allowed to mutate a “let” Array as long as you didn’t change its length. The community didn’t like it and things moved to COW instead.</div></div></blockquote></div>… and it made a lot of sense, because "can't be resized" is not a very useful feature when you can't reason about the size, and "can't be modified at all" helps a lot.<div class="">Fixed-size arrays are completely different when they expose their size to the type checker.<br class=""><div class=""><br class=""></div></div></body></html>