Hacker News new | ask | show | jobs
by Dylan16807 3939 days ago
>I tried to debunk that with careful thought.

Well you didn't really succeed. Your argument against using const comes down to "someone might violate expectations or remove the word const, so let's not even try". I don't agree with that.

Traditional constants are used to show that nothing changes in large swaths of code; showing how much benefit you get in a standalone 12 line function is not meaningful.

Also, calling function scoping bad is not revisionism. That is not a new idea, and does not depend on 'let' existing.

Edit: And the the article you linked about let is saying so many ridiculous things I won't even try to respond to it, but jeez. 'implicit'

1 comments

> Your argument against using const comes down to ...

You did an absolutely horrible job of summarizing even remotely what my argument was, so I guess "I won't even try to respond to" this, since you either can't critically read or didn't care to this time. jeez.

That's what you devote several paragraphs to. I'm not sure how else you explain quotes like "the likelihood is that a developer who needs to change a variable and gets a const-thrown error about it will probably just change the const to let and go on about their business."

I don't care to argue about 'let' because this is a post about 'const'. I was writing a rebuttal in the previous comment but realized it was way too off-topic. But your definition and reasoning for "implicit scope" hurts me to read.