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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tutizaraz
Copy link

@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
Author

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

spec.html 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.

_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
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OrdinaryCreateFromConstructor has wrong parameter type
4 participants