Should "const" be favored over "let"?

Marius Gundersen gundersen at
Fri Apr 17 16:33:32 UTC 2015

I too have found that most of my variables are defined with const, as they
never change. Let var die is a catchy saying, but I believe it should be
let var die, use const.

On Fri, Apr 17, 2015 at 6:16 PM, Allen Wirfs-Brock <allen at>

> I agree, 'let' is likely to win because of it's length.  I find that I
> fall into using it solely or that reason.  I think it also wins on
> readability.
> If we had a "do-over".  I'd make `let` means what `const` now means and
> have something different for defining mutable lexical bindings.  Maybe `let
> var foo=...;`.
let and mut?  Oh well, too late for that now.

Marius Gundersen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list