'var' as alias for 'let mut' · Issue #2304 · rust-lang/rfcs · GitHub
DRANK
Now that rust compiles to wasm it would be nice to play to the Web community. Thus a shortcut var x=1; for let mut x=1; would not only safe four keystrokes in each instance but also be nicer on the...
2 comments
ちなみにだけどRustの場合
let Point { mut x, y } = point;
のようにかけて、xだけを可変として以降使えるけど、varにしてしまうと
var Point { x, y } = point;
let mutのエイリアスとしてvarを入れてみてはどうかという提案はRustでは昔されていたことがある。ちなみにクローズされてる。
github.com/rust-lang/rfcs…