[Pitch] InlineArray type sugar

Just a thought, but as an algebraic type this is an exponential, so the following could work:

[Int^5]
[[Int^5]^3]

Or:

[Int**5]
[[Int**5]**3]

However, this reverses the order and I can imagine that is not preferred. We do have an existing notation for exponentials that does use the proposed order, which is the arrow:

[5 -> Int]
[3 -> [5 -> Int]]

This may be too theoretical, though, and perhaps confusing.

2 Likes