News for hackers. Stuff that matters.
Re:JavaScript variables: var and let and const by hombre_fatal on Friday March 06, 2020 @03:14PM (#22506871)
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.

Re:JavaScript variables: var and let and const by bobbylarrybobby on Friday March 06, 2020 @06:01PM (#22508176)
Swift’s var and let are also good. There is no “default” but “let” is obviously preferred