Mark S. Miller
erights at google.com
Thu Mar 29 08:59:59 PDT 2012
On Thu, Mar 29, 2012 at 8:30 AM, Andreas Rossberg <rossberg at google.com>wrote:
> On 29 March 2012 17:11, Mark S. Miller <erights at google.com> wrote:
>> In listing these, I realize just now that we missed one from the
>> discussion yesterday. Does "var" hoist across a "=>"?
> Ah, nice, that's a good one, too.
>> The two weak-almost-TCP-respecting answers are "yes" and "programs with
>> such 'var' occurrences are statically rejected". I hope we find time to
>> discuss this today.
> Hold on, do you even view the former as an option? Seems like it would be
> a major foot torpedo for sure. Even considering the idea makes me cringe...
Agreed. I make this abstract argument on the way to advocating the static
rejection option, as you guessed.
> I'd be happy to disallow 'var' in lambda bodies, but I don't know how well
> that flows with the code transitioning argument.
Transition "var"s into "const"s, "let"s, and "function"s prior to
transitioning blocks into closures.
In fact, I'd recommend transitioning "var"s into "const"s, "let"s, and
"function"s prior to getting out of bed in the morning ;).
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss