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 -
You can tell if local bindings are mutated by reading the code. If it's hard, your functions are too big. What you can't get back ...
1 reply 0 retweets 0 likes -
Replying to @wycats @_joshburgess and
is the original author's INTENT, which is far far more valuable. Use const to mean "you shouldn't change this to let"
1 reply 0 retweets 0 likes
const-until-you-mutate devalues const. It makes switching to let mindless. I won't turn ppl into FP programmers.
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.