-
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: Explicitly define default value of 'internalSlotsList' in OrdinaryCreateFromConstructor #2379
base: main
Are you sure you want to change the base?
Conversation
85aad5f
to
8c4fe31
Compare
8c4fe31
to
787d2ee
Compare
@@ -10569,6 +10569,7 @@ <h1>OrdinaryCreateFromConstructor ( _constructor_, _intrinsicDefaultProto_ [ , _ | |||
<emu-alg> | |||
1. Assert: _intrinsicDefaultProto_ is a String value that is this specification's name of an intrinsic object. The corresponding object must be an intrinsic that is intended to be used as the [[Prototype]] value of an object. | |||
1. Let _proto_ be ? GetPrototypeFromConstructor(_constructor_, _intrinsicDefaultProto_). | |||
1. If _internalSlotsList_ is not present, set _internalSlotsList_ to a new empty List. |
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.
The prose for this AO already says “ If internalSlotsList is not provided, a new empty List is used.”.
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.
While that's true, I think it's nicer to have it in the algorithm steps as well. There's a few other places we do this, like in Abstract Relational Comparison, and I think we should change all of them.
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.
In that case, should it be removed from the prose?
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 think it's fine to keep it in the prose as well - it's an accurate and potentially useful description of the behavior of the algorithm.
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.
would you expect, then, that it'd be duplicated in prose and an algorithm step in every case where there's a default value on an optional AO argument?
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.
No, the preambles are just general descriptions of the behavior; they don't need to all give exactly the same level of details.
3d0c24c
to
7a79833
Compare
In 10.1.13 OrdinaryCreateFromConstructor, it might be better to explicitly define default value of
internalSlotsList
when it is not provided.