-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Labels
Description
In order to improve the overall look of code, it would be helpful to support a static array syntax. For example, something like this:
fn sum(xs [4]u16) -> (res u32) {
res = xs[0] + xs[1] + xs[2] + xs[3]
}
This would then automatically expand out to something equivalent to this:
fn sum(xs_0 u16, xs_1 u16, xs_2 u16, xs_3 u16) -> (res u32) {
res = xs_0 + xs_1 + xs_2 + xs_3
}
For now, we would restrict the indices to be constants only. Therefore, e.g. xs[y] would not be permitted, etc.