Open chancehudson opened 1 week ago
Once a variable is defined the dimensions of the variable should not be able to change. Right now the following code compiles:
let x = [1, 2, 3] assert_eq(x[0], 1) assert_eq(x[1], 2) assert_eq(x[2], 3) x = 5 assert_eq(x, 5)
Technically it's not complex to manage changing dimensions. It seems like a footgun to expose this capability as a feature of the language though.
Once a variable is defined the dimensions of the variable should not be able to change. Right now the following code compiles:
Technically it's not complex to manage changing dimensions. It seems like a footgun to expose this capability as a feature of the language though.