Feature request: Const declarations in methods and functions #5946
Labels
kind: enhancement
Enhancements, feature requests, etc. These are NOT bugs, but ways we can improve Dafny
part: language definition
Relating to the Dafny language definition itself
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.
The text was updated successfully, but these errors were encountered: