Sure, but am I reading your reply correctly in that the regret is `let` vs `const` is a source of debate? I still don't get it.
-
-
Your preferred style is indeed a popular one, possibly the most popular one. However IMO it leads to considerably worse code. 1/
2 replies 3 retweets 7 likes -
Considerably worse code in what way? How?
1 reply 0 retweets 0 likes -
The rest of that thread (also see
@wycats’s additions) is my attempt to explain how.1 reply 0 retweets 0 likes -
Less useful than true immutability doesn't mean considerably worse code than using `let` everywhere, IMO. You at least know about binding.
1 reply 0 retweets 1 like -
Replying to @_joshburgess @littlecalculist and
Not ideal, but better than nothing at all, IMO.
1 reply 0 retweets 0 likes -
Read the whole thread.
1 reply 0 retweets 0 likes -
I did. I don't agree. There's still value in knowing whether local bindings are mutated. Encourages a more functional, less imperative style
2 replies 0 retweets 1 like -
Whether smthg effectively encourages behavior is an empirical question. The idea that const actually turns people into FPers is hard to buy.
1 reply 0 retweets 0 likes -
That's an exaggeration of what I said. Encouraging a style and turning people into FPers are very different things.
3 replies 1 retweet 1 like
Focus on what I'm saying not the phrasing. const-until-you-mutate makes switching to let mindless. Const pacifies the linter, not the mind.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.