Andreas Rossberg
unread,Oct 14, 2015, 4:11:23 PM10/14/15Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Michael McGlothlin, Sébastien Doeraene, Martin Probst, Tim Ruffles, Strengthen JS
On 14 October 2015 at 21:04, Michael McGlothlin
<
mike.mc...@gmail.com> wrote:
> Would you have to check or could you just blindly assign the values, in the
> strong scope, back to the original values? It still would take time but
> usually that sort of thing is faster than bothering to actually check if you
> need to do it. Not sure how JS engines store the scope internally but I
> assume that when a function is called it has to define it's scope in memory
> some way so you could modify that action to have a pre-defined table with
> the right values already there instead of being a blank table.
You could in fact do that with zero overhead -- you'd effectively
treat `undefined` as a keyword, so no need for a runtime
representation as a binding.
However, that would violate the stated goal of being a subset
semantics, because it would silently change the meaning of some
construct in a way that is not raising an error. As described in the
proposal, we would like to avoid making such changes for strong mode,
since it makes porting harder and more brittle.
/Andreas