SE-0483: `InlineArray` Literal Syntax

I wanted to make sure that I had the correct understanding of how important the Inline part of InlineArray was, so I went back and skimmed the 2nd review thread and acceptance post. I found a lot of disagreement on how important Inline is, however this is in the acceptance post, which seems most relevant:

That feels opposed to the proposed sugar which hides the inline property and only shows the fixed-size property. I expect [5 x Int] to be easy & appealing for users who won't realize that they're even using an InlineArray.


Something else I realized while reviewing those threads is that there have been several other types of Array's discussed for the future, and this sugar could impact them. If we're going to have sugar for InlineArray I think we need to consider the impact this sugar will have on future array types like a ContiguousArray or RigidArray, especially since some of the proposed sugar could easily extend to support them ([5 inline Int], [5 rigid Int], ...), while others don't appear to ([5 x Int], [5 <what goes here?> Int], ...).

9 Likes