Skip to content

Please add non-short-circuit boolean operators |, |=, &, &=, ^, ^=, and ! to the bool type #1080

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

Closed
DartBot opened this issue Jan 6, 2012 · 5 comments
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. closed-not-planned Closed as we don't intend to take action on the reported issue type-enhancement A request for a change that isn't a bug

Comments

@DartBot
Copy link

DartBot commented Jan 6, 2012

This issue was originally filed by [email protected]


example usage:

bool a();
bool b();
return a() | b(); // Want to call b() even if a() returns false.

Second example usage

bool dirty = false; // accumulate dirty bit
dirty |= a();
dirty |= b();
dirty |= c();
return dirty;

@dgrove
Copy link
Contributor

dgrove commented Jan 9, 2012

Added Area-Language, Triaged labels.

@gbracha
Copy link
Contributor

gbracha commented Jan 10, 2012

Set owner to @gbracha.
Added Accepted label.

@anders-sandholm
Copy link
Contributor

Removed the owner.
Removed Area-Language label.
Added Area-Library label.

@lrhn
Copy link
Member

lrhn commented May 14, 2013

Issue #7934 has been merged into this issue.


cc @floitschG.

@lrhn
Copy link
Member

lrhn commented Sep 2, 2013

The vote is that having both & and && on booleans is likely to be error prone, and the small advantage that having the non-short-circuit operators will give isn't worth the extra risk.


Added NotPlanned label.

@DartBot DartBot added Type-Enhancement area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. closed-not-planned Closed as we don't intend to take action on the reported issue labels Sep 2, 2013
@kevmoo kevmoo added type-enhancement A request for a change that isn't a bug and removed type-enhancement labels Mar 1, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. closed-not-planned Closed as we don't intend to take action on the reported issue type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

6 participants