<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><blockquote type="cite" class=""><div class="">On Jul 23, 2017, at 2:07 PM, Nevin Brackett-Rozinsky via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">I think fixed-size arrays should be a nominal type like any other. They should be able to have methods, conform to protocols, be extended with new behavior, and generally present a user-experience similar to what arrays already have. In particular, they should conform to Collection and to ExpressibleByArrayLiteral.</div></div></blockquote><div><br class=""></div><div>Nominal types have to be completely initialized in their initializer, and I don’t think that should change. But we want to allow arrays to start off uninitialized, instead of a blanket initialization that would be paved over by the real initial data. That’s one reason FSAs are compound types. Another reason is that they’re kind-of low level, like tuples.</div><div><br class=""></div><div>As I said in some other responses, the solution to slapping methods/protocols/other-new-interfaces to compound types is to make a strong type-alias of that type and add your interface there. (Once we have strong type-aliases, of course.)</div><div><br class=""></div><div>I have fixed-size arrays to be compound types because&nbsp;</div><div><br class=""></div><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="">If we are going to use semicolons at all, it should be to demarcate the rows of a 2-dimensional array, as that will be one of the most common use-cases:</div><div class=""><br class=""></div><div class=""><font face="monospace, monospace" class="">let identity3x3: [Int(3, 3)] = [1, 0, 0;</font></div><div class=""><font face="monospace, monospace" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0, 1, 0;</font></div><div class=""><font face="monospace, monospace" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0, 0, 1]</font></div></div></div></blockquote><br class=""></div><div>That doesn’t seem scalable to higher dimensions.</div><br class=""><div class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">—&nbsp;</div><div class="">Daryle Walker<br class="">Mac, Internet, and Video Game Junkie<br class="">darylew AT mac DOT com&nbsp;</div></div></div><br class=""><div><blockquote type="cite" class=""></blockquote></div></div></body></html>