Let’s take this off poor @pamelafox’s mentions, y’all. She’s suffering enough with this needless debate within her own company!
-
-
Replying to @littlecalculist @wycats
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.
2 replies 0 retweets 1 like -
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 -
People tend to think "letting readers know whether my local binding is mutated is important enough to signal with a keyword." I disagree 2/
3 replies 1 retweet 2 likes -
Mutation is difficult to manage *in the large* and deserves careful annotation. Const doesn't help with this. 3/
2 replies 1 retweet 7 likes -
In the small, it's much less useful. It's distracting to the reader of the code to be constantly informed "this binding is not mutated" 4/
2 replies 1 retweet 12 likes -
Worse, it's confusing people because it's not telling you the value is immutable, just the binding. 5/
2 replies 3 retweets 10 likes -
Replying to @littlecalculist @wycats
I feel like your point is strong, but I've never known a dev to miss the distinction between mutable vs const name binding.
1 reply 0 retweets 1 like -
Replying to @theomn @littlecalculist
1: The point of const to me is to let the user know that the original author INTENDED it to be immutable.
2 replies 0 retweets 0 likes -
I thought you were talking about C++ for the entire thread and I was *extremely* confused :P
1 reply 0 retweets 2 likes
Haha. The story is different in rust :)
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.