You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We disallow the "use strict" directive in functions with non-simple parameter lists because it complicates the parsing of the parameter list. While the directives introduced by this proposal do not affect parsing, they do affect "earlier" code, e.g. functions defined in the parameter list. Is that a significant enough inconvenience for implementers that we want to disallow the commingling of these two features?
@ljharb It's not quite the same reasons though. An implementation wouldn't have to re-parse the parameter list, they would just need to track the functions that they parsed in the parameter list until they've passed the directive prologue. This is a significantly smaller implementation burden.
We disallow the
"use strict"
directive in functions with non-simple parameter lists because it complicates the parsing of the parameter list. While the directives introduced by this proposal do not affect parsing, they do affect "earlier" code, e.g. functions defined in the parameter list. Is that a significant enough inconvenience for implementers that we want to disallow the commingling of these two features?/cc @bakkot who raised this question
The text was updated successfully, but these errors were encountered: