Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Not sure whether this should be prefixed with "!". I assume it should, but then SetFunctionName often isn't elsewhere in the spec and I'm not sure why.
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.
If an operation cannot ever return an abrupt completion, then I'd say invocations of it shouldn't be preceded by '!'. It isn't wrong, but it's unnecessary clutter. (This would be more persuasive if you could easily tell from an operation's 'declaration' whether it ever returns an abrupt completion. See issue #253.)
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.
So just to clarify my understanding here:
While
DefinePropertyOrThrow
can throw in some circumstances, it can't in this case, because we know from the first assertion inSetFunctionLength
thatDefinePropertyOrThrow
's first argument is extensible and doesn't have alength
own prop which could interfere with setting.Thus we know that
SetFunctionLength
won't ever throw.Preceding an abstract operation call by "!" means that we are in a situation where an abstract operation won't throw, although it might do so in different circumstances.
Operations which never throw should never be prefixed with "!" even though we can't know from looking at the abstract operation's signature or its name that this is the case.
So for now,
SetFunctionLength
should not be prefixed with anything?Is my understanding correct?
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.
Your understanding matches mine. Whether it's correct is up to the editors.
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 don't agree with this; I think we should use ! everywhere. (I am also not an editor.)