Should "const" be favored over "let"?
Marius Gundersen
gundersen at gmail.com
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 wirfs-brock.com>
wrote:
>
> 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: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150417/999822cd/attachment-0001.html>
More information about the es-discuss
mailing list