Open MikaelMayer opened 2 days ago
Following the ideas of this video https://youtu.be/f74PSgwLdDk?si=M5llP57gTIwiw3dA&t=969
We wish to have
method Test() { const x := 2; x := x + 1; // Error ! }
that could prevent accidental rewrite of a variable, like in JavaScript, or Rust (let without mut)
Similarly, in functions, we could benefit from this syntax and deprecate the "var" there, since variables are not overridable by default.
function Test(): int { const x := 2 x }
The semi-colon could be optional for functions.
Related to https://github.com/dafny-lang/dafny/issues/5914
Following the ideas of this video https://youtu.be/f74PSgwLdDk?si=M5llP57gTIwiw3dA&t=969
We wish to have
that could prevent accidental rewrite of a variable, like in JavaScript, or Rust (let without mut)
Similarly, in functions, we could benefit from this syntax and deprecate the "var" there, since variables are not overridable by default.
The semi-colon could be optional for functions.