I've switched to let/const completely. The gain of using const isn't performance (you can statically analyze whether any non-global is potentially assigned to). The gain from const is that it's very very easy for a human to statically analyze.
If I see a let binding, I know I need to be a bit more careful with editing that piece of code. I originally thought this'd be a terrible idea, but it's been working great for me. On Thu, Apr 16, 2015 at 10:53 PM, Glen Huang <[email protected]> wrote: > I've completely replaced "var" with "let" in my es 2015 code, but I > noticed most variables I introduced never change. > > Should I replace them with "const"? Will there be any performance gain for > most browsers? If so, should such performance gain be considered micro > optimization? > _______________________________________________ > es-discuss mailing list > [email protected] > https://mail.mozilla.org/listinfo/es-discuss >
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

