2 ms·
I wrote a related post a few months back: http://www.brandonsmith.ninja/blog/procedures-functions-data http://www.brandonsmith.ninja/blog/procedures-functions-d
by brundolf 7y ago
I wrote a related post a few months back: http://www.brandonsmith.ninja/blog/procedures-functions-data http://www.brandonsmith.ninja/blog/procedures-functions-data
Something interesting that's happened since then: I've taken a job at a Python company, and I've noticed that, compared to JavaScript, assigning intermediate results into local variables seems to be much more idiomatic in Python for some reason. This is doubly surprising since JavaScript at least has the const keyword. I'm not sure yet how I feel about it.
One other anecdote: I personally relax my usage of assignment a lot more when using Rust, because a) it has rich, deep immutability at a type level, and b) its expressions tend to be longer than those in other languages due to all the monads and such.