I’d like template type instantiations to look like these:
Vec|Int
Array[Uint, 3]
Box|Map[Str, Int64]
Using square brackets (similar to the indexing operator) for template arguments makes sense if you think of a type template as an infinite array of types.
Pulling on that thread, indexing operator could also use the shorthand x|i for the single argument case:
let mut values: Array[int, 3] = { 11, 22, 33 };
values|2 = 66;
Multi-argument indexing would have to use the long format x[i, j, k, ...]:
let mut grid: Array[int, 3, 5] = { {111, ..3}, ..5 };
grid[2, 4] = 222;