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

Add >>> operator (new in 2.14) #3541

Merged
merged 4 commits into from
Sep 8, 2021
Merged

Add >>> operator (new in 2.14) #3541

merged 4 commits into from
Sep 8, 2021

Conversation

kwalrath
Copy link
Contributor

@kwalrath kwalrath commented Sep 1, 2021

@kwalrath kwalrath added this to the Next stable release milestone Sep 1, 2021
@kwalrath kwalrath requested a review from lrhn September 1, 2021 22:08
@google-cla google-cla bot added the cla: yes Contributor has signed the Contributor License Agreement label Sep 1, 2021
Copy link
Member

@parlough parlough left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all looks great and makes sense to me :)

I'm not sure all users will understand exactly what >>> does from just the examples, but the other bitwise operators are lacking similar details as well. Perhaps that's a location for improvement in the future or a separate tutorial/article.

@kwalrath
Copy link
Contributor Author

kwalrath commented Sep 2, 2021

I'm not sure all users will understand exactly what >>> does from just the examples, but the other bitwise operators are lacking similar details as well. Perhaps that's a location for improvement in the future or a separate tutorial/article.

Yeah, I went with the same minimalism as before. I tried to come up with a better example, but we figured that >>> (and possibly all bitwise operators) is something most people don't need, and if they do need it, they already know how to use it. So I concentrated on having a working test and putting in the words people might search for.

@kwalrath kwalrath marked this pull request as draft September 2, 2021 00:05
@kwalrath
Copy link
Contributor Author

kwalrath commented Sep 2, 2021

I think the build break for stable tests is due to requiring 2.14 (for >>>). Also, once a stable 2.14 is available, I should change examples/misc/pubspec.yaml to have 2.14.0 instead of 2.14.0-0.

@kwalrath
Copy link
Contributor Author

kwalrath commented Sep 7, 2021

@lrhn or @mit-mit is this good to go once the feature's in a stable release?

@kwalrath kwalrath marked this pull request as ready for review September 7, 2021 23:04
@lrhn
Copy link
Member

lrhn commented Sep 8, 2021

I'd say so, yes. LGTM.

@google-cla
Copy link

google-cla bot commented Sep 8, 2021

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added cla: no Contributor has not signed the Contributor License Agreement and removed cla: yes Contributor has signed the Contributor License Agreement labels Sep 8, 2021
@parlough
Copy link
Member

parlough commented Sep 8, 2021

@googlebot I consent.

@google-cla google-cla bot added cla: yes Contributor has signed the Contributor License Agreement and removed cla: no Contributor has not signed the Contributor License Agreement labels Sep 8, 2021
@parlough
Copy link
Member

parlough commented Sep 8, 2021

I rebased to fix the stable build but it seems updating the constraint to 2.14.0 didn't fit the constraint of the beta build.

We can either keep 2.14.0-0 (which I did for now) or temporarily disable the beta analysis job.

Edit: Now that 2.14.1 has been released to the beta channel as well, this can be switched back to simply 2.14.0 :)

@github-actions
Copy link

github-actions bot commented Sep 8, 2021

Visit the preview URL for this PR (updated for commit 54f2f8c):

https://dart-dev--pr3541-kw-triple-shift-exagjh06.web.app

(expires Wed, 15 Sep 2021 14:15:31 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: d851bc446d3c4d7394c5406c6f07255afc7075f3

@parlough
Copy link
Member

parlough commented Sep 8, 2021

When I was taking another look before I merged this in, but I noticed we have a section on compound assignment operators, and it seems >>>= is valid. Do we want to add it to that section as well?

@mit-mit
Copy link
Member

mit-mit commented Sep 8, 2021

I asked @lrhn, and it sounds like we should indeed be listing >>>= in the table here:
https://kw-staging-dartlang-2.web.app/guides/language/language-tour#assignment-operators

@kwalrath
Copy link
Contributor Author

kwalrath commented Sep 8, 2021

I'll add >>>= a little later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Contributor has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document the triple-shift (>>>) operator
5 participants