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

Spec review #35

Merged
merged 4 commits into from Sep 8, 2019

Conversation

@ljharb
Copy link
Member

commented Sep 4, 2019

Partial fixes for #33.

ljharb added 3 commits Sep 4, 2019
@ljharb ljharb referenced this pull request Sep 4, 2019
4 of 5 tasks complete
1. Perform ! DefinePropertyOrThrow ( _O_, `"errors"`, _errorsDesc_ ).
1. Let O be ? OrdinaryCreateFromConstructor(_newTarget_, `"%AggregateError.prototype%"`, « [[ErrorData]] »).
1. Let _errorsArray_ be ! CreateArrayFromList(? IterableToList(_errors_)).
1. Perform ! CreateMethodProperty(_O_, `"errors"`, _errorsArray_).

This comment has been minimized.

Copy link
@zloirock

zloirock Sep 4, 2019

Sure, CreateMethodProperty makes sense here, but, since it's not a method and since this operation is not actively used in the spec, maybe it should be renamed to something like CreateNonEnumerableProperty?

This comment has been minimized.

Copy link
@ljharb

ljharb Sep 5, 2019

Author Member

Perhaps so, but that’s an editorial change I’d make separately.

@mathiasbynens mathiasbynens requested review from chicoxyzzy and bakkot Sep 5, 2019

@chicoxyzzy
Copy link
Member

left a comment

Thank you!

</tr>
</tbody>
</table>
</emu-table>

This comment has been minimized.

Copy link
@chicoxyzzy

chicoxyzzy Sep 5, 2019

Member

AFAIU this table should also include AggregateError.prototype

This comment has been minimized.

Copy link
@ljharb

ljharb Sep 5, 2019

Author Member

I intentionally did not include it; prototype objects no longer need to be indicated explicitly since we have the intrinsic dot syntax. The current ones are all legacy.

1. Let _errorsDesc_ be the PropertyDescriptor { [[Value]]: _errorsArray_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *true* }.
1. Perform ! DefinePropertyOrThrow ( _O_, `"errors"`, _errorsDesc_ ).
1. Let O be ? OrdinaryCreateFromConstructor(_newTarget_, `"%AggregateError.prototype%"`, « [[ErrorData]] »).
1. Let _errorsArray_ be ! CreateArrayFromList(? IterableToList(_errors_)).

This comment has been minimized.

Copy link
@bakkot

bakkot Sep 6, 2019

Collaborator

I am not a fan of using multiple !/? macros in a single algorithm step. It's probably clear to a human, but it is not allowed by the current definition of the macros and it is not totally clear to me if it would be allowed after tc39/ecma262#1573.

(And there's no real reason not to just introduce a new variable and make it totally unambiguous.)

This comment has been minimized.

Copy link
@ljharb

ljharb Sep 6, 2019

Author Member

We definitely do it in the spec in a number of places already; if 1573 wouldn’t allow it, we should ensure it will.

I could split it up, but I don’t think it adds clarity to do so.

This comment has been minimized.

Copy link
@mathiasbynens

mathiasbynens Sep 8, 2019

Member

I tend to agree with:

(And there's no real reason not to just introduce a new variable and make it totally unambiguous.)

Happy to make this change separately though. No need to block this pull request.

spec.html Show resolved Hide resolved

@mathiasbynens mathiasbynens requested a review from chicoxyzzy Sep 8, 2019

@mathiasbynens

This comment has been minimized.

Copy link
Member

commented Sep 8, 2019

This still LGTM.

@chicoxyzzy chicoxyzzy merged commit 24ae63a into tc39:master Sep 8, 2019

1 check passed

Travis CI - Pull Request Build Passed
Details

@ljharb ljharb deleted the ljharb:spec_review branch Sep 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.