-
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: inline infallible CreateDataPropertyOrThrow calls #2528
base: main
Are you sure you want to change the base?
Conversation
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.
This no longer indicates to the reader that the property is guaranteed to be created, since CreateDataProperty
can return false and there is nothing to indicate to the reader that it does not in these cases. I'm opposed.
Indeed, In this case, your change would require an assertion that the result was |
5af73df
to
4a8b29d
Compare
Result from editor call today is that we should make a new AO for infallible |
@michaelficarra should this be left open until then? or closed? |
let's leave it open and do the work here |
There's no reason to call
CreateDataPropertyOrThrow
when it cannot fail (marked with!
). Instead, callCreateDataProperty
directly.