-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scope of var
in the block?
#24
Comments
The proposal as stands radically changes the scoping + hoisting mental model around |
It also goes much more beyond
|
All really good points, thanks for filling. As raised by Mark, would disallowing |
Making |
Got it, thanks. Fair to say that, if some of those are acceptable alternatives, we would still have the remaining challenge of:
But would address the following:
|
Indeed. More problematically, with TCP, the implementability of this proposal is prohibitively low. It would require very significant engineering to get correct and fast in current engines. Without TCP, would you still want to push for the feature? |
As a rule of thumb, no, I don't think I'd want this feature without TCP, but I'd want to look on a case by case basis to understand what the trade-offs are. |
(related to #16 and #21)
var
has function scope:What happens when this is done inside a block param?:
(and how does this change in strict vs sloppy mode?)
The text was updated successfully, but these errors were encountered: