I prefer rust's approach of immutability by default, which also applies to function arguments, you have to add mut to be able to change it in the function
I think I'll be going this way as well now -- I don't have the immutable feature yet, on my infinite todo list.
As to normal variables, it'll be easy to introduce, since declarations now use var implying variable, thus mutable, and functions use defn implying a literal function. I can also add a let which denotes an immutable value.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I prefer rust's approach of immutability by default, which also applies to function arguments, you have to add
mut
to be able to change it in the functionI think I'll be going this way as well now -- I don't have the immutable feature yet, on my infinite todo list.
As to normal variables, it'll be easy to introduce, since declarations now use
var
implying variable, thus mutable, and functions usedefn
implying a literal function. I can also add alet
which denotes an immutable value.