[Pitch] InlineArray type sugar

To anyone suggesting a syntax such as Int[4], please be aware that this syntax already has the meaning of calling a static subscript. For instance:

extension Int {
	static subscript (count: Int) -> Array<Int> {
		Array(repeating: 0, count: count)
	}
}

let x = Int[4] // [0,0,0,0] per extension above

I suppose we could make it have a different meaning depending on if we're in a position where we are expecting a type or a value, but that'd still make things confusing.

12 Likes