3 ms·
A solution I prefer is Rust's where the immutable binding is default "let x" and you opt-in with a modifier to make it mutable "let mut x". It just makes sense
by hombre_fatal 7y ago
A solution I prefer is Rust's where the immutable binding is default "let x" and you opt-in with a modifier to make it mutable "let mut x".
It just makes sense for the immutable case to be default by design instead of just by developer habit.
"var" vs "val" always were too similar for me.
- bobbylarrybobby 7y agoSwift’s var and let are also good. There is no “default” but “let” is obviously preferred