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

">>>" operator is not supported #2755

Closed
arcticfox1919 opened this issue Nov 13, 2020 · 8 comments
Closed

">>>" operator is not supported #2755

arcticfox1919 opened this issue Nov 13, 2020 · 8 comments
Assignees
Labels
a.language Relates to the Dart language tour e0-minutes Can complete in < 60 minutes of normal, not dedicated, work e1-hours Can complete in < 8 hours of normal, not dedicated, work p3-low Valid but not urgent concern. Resolve when possible. Encourage upvote to surface.

Comments

@arcticfox1919
Copy link

I see the ">>>" operator in the document, but I get an error when I use it. Is this an oversight of the document?

@kwalrath
Copy link
Contributor

Oh interesting! I see the operator in the spec, but num, int, and double don't seem to implement it. I suspect it's available for specialized number classes.

/cc @lrhn for guidance on how to cover this in the language tour

@kwalrath kwalrath added act.wait-for-customer Needs response from customer a.language Relates to the Dart language tour labels Nov 13, 2020
@lrhn
Copy link
Member

lrhn commented Nov 16, 2020

The >>> operator is not implemented yet. It's been specified since before 2.0, but implementing it hasn't been a priority yet.
So, nobody can use it. I hope it will be implemented real soon now.

When we introduce it into the implementations, then we will probably also add a >>> operator to the int class.

@kwalrath kwalrath added e1-hours Can complete in < 8 hours of normal, not dedicated, work p3-low Valid but not urgent concern. Resolve when possible. Encourage upvote to surface. and removed act.wait-for-customer Needs response from customer labels Nov 16, 2020
@kwalrath
Copy link
Contributor

We might want to mention somewhere that >>> isn't implemented, probably in https://dart.dev/guides/language/language-tour#bitwise-and-shift-operators.

@kwalrath kwalrath added the e0-minutes Can complete in < 60 minutes of normal, not dedicated, work label Nov 16, 2020
@RandalSchwartz
Copy link

One would wonder why there isn't a matching <<< then.

@lrhn
Copy link
Member

lrhn commented Jan 20, 2021

There is an infinity of possible operators that we can add to the language. We can (and do) consider whether we should introduce larger regular families of operators, or just stick with the ones we have. Until such time, we'll probably only add specific operators that we actually need. The >>> is well-established and do we have an actual need for it. (Really, removing the >>> operator from the language when we removed it from int was completely uncalled for, we should just have left it in).
I'd probably accept ** as well, but that's about it.

@kwalrath
Copy link
Contributor

kwalrath commented Feb 2, 2021

dart-lang/language#1417 has a plan for implementing >>>.

@kwalrath kwalrath self-assigned this Feb 6, 2021
@parlough parlough added this to the Next stable release milestone Jun 1, 2021
@parlough
Copy link
Member

parlough commented Jun 1, 2021

For reference, the 2.14 dev builds now include the necessary implementation, with a changelog entry here: https://github.com/dart-lang/sdk/blob/master/CHANGELOG.md#language

@parlough
Copy link
Member

parlough commented Aug 5, 2021

Closing in favor of #3455 which will see the >>> operator as implemented in Dart 2.14 documented.

Thanks for opening the issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a.language Relates to the Dart language tour e0-minutes Can complete in < 60 minutes of normal, not dedicated, work e1-hours Can complete in < 8 hours of normal, not dedicated, work p3-low Valid but not urgent concern. Resolve when possible. Encourage upvote to surface.
Projects
None yet
Development

No branches or pull requests

6 participants