chore: rename Elvis to safe navigation operator #1139
Conversation
I also updated the cheatsheet, better now than forget later :) |
.callout.is-helpful | ||
header Dart difference: ?. is a Dart operator | ||
:marked | ||
The Elvis operator (`?.`) is part of the Dart language. | ||
The safe navigation operator (`?.`) is part of the Dart language. |
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.
That's not the name we've used in Dart, but I can live with it.
(For the curious: The Dart spec & language tour tend to avoid using a name for it, although the language tour does once call it conditional member access.)
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 mind changing it for something different, not a problem :)
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.
Still better name than no name I guess.
LGTM! |
Can you provide context for why we are making this change? @IgorMinar prefers the shorter "Elvis operator", so I'd like to understand the change. |
Where does the need to rename this operator come from? |
My bad. Ward asked me to, but there are the issues for it: And here: angular/angular#791 (comment) |
I see. Yeah. let's go ahead and rename. Thanks for making the PR. Can you please reference the other issues via |
Can I reference PRs in other repo here with that? On the other hand I created a PR at angular repo (to rename the cheatsheet too) which closes the open issue there. EDIT: Seems like I can, although the other PR should be merged I guess. |
Thanks Jesus. Merging. |
Here is the needed rename. I decided not to capitalize "Safe" in any case because I don't like how the text flows in that case.
@kwalrath I checked the Dart part, I don't see any difference on both TS and Dart guides after the changes.
Closes angular/angular#6387