Bill Sourour
1 min readDec 16, 2016

--

Thank you for your thoughtful response.

To clarify, I am not advocating the use of var over const.

That passage was me trying to point out a difference between the two, not me advocating for one over the other. In my ES2015 work, I haven’t yet found a reason to use var at all.

I also agree with, and use, the convention of declaring variables at the top of their scope. What makes things tricky when it comes to functional languages like JavaScript is that functions are treated as values, so it’s tempting — and in many ways accurate — to say that there is no difference between declaring a variable and declaring a function. This naturally would lead one to confer all the rules of variable declaration to function declaration as well.

My view — as expressed in this article — is that there is value in treating them differently.

In terms of JSLint and Douglas Crockford, I suspect that Mr. Crockford would deeply disagree with my entire article.

From what I know of his positions, certainly as they are expressed through JSLint, he is against taking advantage of hoisting in any way because, in his research, this has led to more problems than it is worth.

I have tremendous respect for Douglas Crockford, his work, and his ideas. In this one very specific instance, we disagree.

--

--