Skip to content
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: OrdinaryCreateFromConstructor has wrong parameter type #3287

Conversation

tutizaraz
Copy link
Contributor

@tutizaraz tutizaraz commented Feb 26, 2024

Fixes #3168

@tutizaraz tutizaraz changed the title clarify first argument of OrdinaryCreateFromConstructor as function object Normative: OrdinaryCreateFromConstructor has wrong parameter type Feb 26, 2024
@ljharb
Copy link
Member

ljharb commented Feb 26, 2024

@tutizaraz can you please confirm that you did not use a LLM (AI) for any part of this PR?

@tutizaraz
Copy link
Contributor Author

@ljharb for english grammar only because it is not my native language

spec.html Outdated Show resolved Hide resolved
@ljharb ljharb changed the title Normative: OrdinaryCreateFromConstructor has wrong parameter type Editorial: OrdinaryCreateFromConstructor has wrong parameter type Feb 26, 2024
Copy link
Member

@linusg linusg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parameter type change LGTM, additional prose is questionable IMO.

spec.html Outdated
_intrinsicDefaultProto_: a String,
optional _internalSlotsList_: a List of names of internal slots,
): either a normal completion containing an Object or a throw completion
</h1>
<dl class="header">
<dt>description</dt>
<dd>It creates an ordinary object whose [[Prototype]] value is retrieved from a constructor's *"prototype"* property, if it exists. Otherwise the intrinsic named by _intrinsicDefaultProto_ is used for [[Prototype]]. _internalSlotsList_ contains the names of additional internal slots that must be defined as part of the object. If _internalSlotsList_ is not provided, a new empty List is used.</dd>
<dd>It creates an ordinary object whose [[Prototype]] value is retrieved from a function object's *"prototype"* property, if it exists. This object is referred to by _constructor_, which can be any function object. If the *"prototype"* property does not exist or _constructor_ is not a traditional constructor, the intrinsic named by _intrinsicDefaultProto_ is used for [[Prototype]]. _internalSlotsList_ contains the names of additional internal slots that must be defined as part of the object. If _internalSlotsList_ is not provided, a new empty List is used.</dd>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"traditional constructor" is not a defined term - either it's a constructor, or it isn't. This also isn't relevant here, the non-constructor cases do have a prototype property so intrinsicDefaultProto is not necessarily used for those.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

then do we need to revert the changes back to what it was?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think the original description is fine.

@bakkot bakkot added the editor call to be discussed in the next editor call label Oct 2, 2024
@michaelficarra michaelficarra removed the editor call to be discussed in the next editor call label Oct 2, 2024
@michaelficarra michaelficarra added the ready to merge Editors believe this PR needs no further reviews, and is ready to land. label Oct 2, 2024
@michaelficarra michaelficarra force-pushed the normative-update-OrdinaryCreateFromConstructor-first-arg-to-function-object branch from 8725a65 to 097a439 Compare October 2, 2024 22:17
@ljharb ljharb force-pushed the normative-update-OrdinaryCreateFromConstructor-first-arg-to-function-object branch from 84b70ba to aada408 Compare October 3, 2024 01:53
@ljharb ljharb merged commit aada408 into tc39:main Oct 3, 2024
8 checks passed
@ljharb
Copy link
Member

ljharb commented Oct 3, 2024

@tutizaraz would you please register as a contributor ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editorial change ready to merge Editors believe this PR needs no further reviews, and is ready to land.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OrdinaryCreateFromConstructor has wrong parameter type
6 participants