-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Editorial: Rename some aliases #2353
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the scope to env change, but still like the original closure name. Happy to hear preferences from @bakkot and @michaelficarra.
Slightly in favour of scope to env, no preference on closure to function. edit: Also in favour of body to script rename. |
@jmdyck Discussed this on the editor call. We favor the |
(force-pushed to resolve merge conflicts) |
So is it that the gain is not worth the churn, or do you actively prefer Currently, every use of |
I personally actively prefer closure, but IIRC @bakkot's preference here was leaning towards less churn, so I think for this PR we can leave the uses of F as is. |
Okay, dropping the first commit then. |
Specifically: `_scope_` -> `_env_` (or sometimes `_outerEnv_`) `_Scope_` -> `_env_` `_classScope_` -> `_classEnv_`
In ParseScript: ParseText is invoked with |Script| as the goal, so the result (if it isn't errors) is an instance of |Script|, so change the alias `_body_` to `_script_`. And note that the Script Record's [[ECMAScriptCode]] field is also an instance of |Script|. In ScriptEvaluation: Since _scriptRecord_.[[ECMAScriptCode]] is an instance of |Script|, change the alias `_scriptBody_` to `_script_`.
force-pushed to:
|
Specifically: `_scope_` -> `_env_` (or sometimes `_outerEnv_`) `_Scope_` -> `_env_` `_classScope_` -> `_classEnv_`
In ParseScript: ParseText is invoked with |Script| as the goal, so the result (if it isn't errors) is an instance of |Script|, so change the alias `_body_` to `_script_`. And note that the Script Record's [[ECMAScriptCode]] field is also an instance of |Script|. In ScriptEvaluation: Since _scriptRecord_.[[ECMAScriptCode]] is an instance of |Script|, change the alias `_scriptBody_` to `_script_`.
Specifically: `_scope_` -> `_env_` (or sometimes `_outerEnv_`) `_Scope_` -> `_env_` `_classScope_` -> `_classEnv_` `_privateScope_` -> `_privateEnv_` `_PrivateScope_` -> `_privateEnv_`
In ParseScript: ParseText is invoked with |Script| as the goal, so the result (if it isn't errors) is an instance of |Script|, so change the alias `_body_` to `_script_`. And note that the Script Record's [[ECMAScriptCode]] field is also an instance of |Script|. In ScriptEvaluation: Since _scriptRecord_.[[ECMAScriptCode]] is an instance of |Script|, change the alias `_scriptBody_` to `_script_`.
force-pushed to:
|
3d0c24c
to
7a79833
Compare
Specifically: `_scope_` -> `_env_` (or sometimes `_outerEnv_`) `_Scope_` -> `_env_` `_classScope_` -> `_classEnv_` `_privateScope_` -> `_privateEnv_` `_PrivateScope_` -> `_privateEnv_`
In ParseScript: ParseText is invoked with |Script| as the goal, so the result (if it isn't errors) is an instance of |Script|, so change the alias `_body_` to `_script_`. And note that the Script Record's [[ECMAScriptCode]] field is also an instance of |Script|. In ScriptEvaluation: Since _scriptRecord_.[[ECMAScriptCode]] is an instance of |Script|, change the alias `_scriptBody_` to `_script_`.
force-pushed to:
|
Specifically: `_scope_` -> `_env_` (or sometimes `_outerEnv_`) `_Scope_` -> `_env_` `_classScope_` -> `_classEnv_` `_privateScope_` -> `_privateEnv_` `_PrivateScope_` -> `_privateEnv_`
In ParseScript: ParseText is invoked with |Script| as the goal, so the result (if it isn't errors) is an instance of |Script|, so change the alias `_body_` to `_script_`. And note that the Script Record's [[ECMAScriptCode]] field is also an instance of |Script|. In ScriptEvaluation: Since _scriptRecord_.[[ECMAScriptCode]] is an instance of |Script|, change the alias `_scriptBody_` to `_script_`.
fc931ca
to
366e0c5
Compare
force-pushed to rebase to master, resolve merge-conflicts |
Specifically: `_scope_` -> `_env_` (or sometimes `_outerEnv_`) `_Scope_` -> `_env_` `_classScope_` -> `_classEnv_` `_privateScope_` -> `_privateEnv_` `_PrivateScope_` -> `_privateEnv_`
In ParseScript: ParseText is invoked with |Script| as the goal, so the result (if it isn't errors) is an instance of |Script|, so change the alias `_body_` to `_script_`. And note that the Script Record's [[ECMAScriptCode]] field is also an instance of |Script|. In ScriptEvaluation: Since _scriptRecord_.[[ECMAScriptCode]] is an instance of |Script|, change the alias `_scriptBody_` to `_script_`.
366e0c5
to
4505fa9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, thanks for updating.
Specifically: `_scope_` -> `_env_` (or sometimes `_outerEnv_`) `_Scope_` -> `_env_` `_classScope_` -> `_classEnv_` `_privateScope_` -> `_privateEnv_` `_PrivateScope_` -> `_privateEnv_`
In ParseScript: ParseText is invoked with |Script| as the goal, so the result (if it isn't errors) is an instance of |Script|, so change the alias `_body_` to `_script_`. And note that the Script Record's [[ECMAScriptCode]] field is also an instance of |Script|. In ScriptEvaluation: Since _scriptRecord_.[[ECMAScriptCode]] is an instance of |Script|, change the alias `_scriptBody_` to `_script_`.
4505fa9
to
38a2584
Compare
No description provided.