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

XOR #34455

Closed
lukostello opened this issue Dec 19, 2019 · 5 comments
Closed

XOR #34455

lukostello opened this issue Dec 19, 2019 · 5 comments
Labels

Comments

@lukostello
Copy link
Contributor

Super simple make XOR like ^^ to fit in with || and && how is this not among the first things included?

@timothyqiu
Copy link
Member

As a workaround, you can use a != b.

@groud
Copy link
Member

groud commented Dec 19, 2019

Duplicate of #22740 and #18816. If you really need more than != please precise your issue.

@lukostello
Copy link
Contributor Author

lukostello commented Dec 19, 2019

Duplicate of #22740 and #18816. If you really need more than != please precise your issue.

While != works in my scenario I don't think ^^ is equal to !=. I tend to think of != and == as having lower priority than && and ||. The way I am thinking about it they always occur last.
false || true ^^ false && false would evaluate to false, while
false || true != false && false would evaluate to true
because false || true != false && false would equal (false || true) ^^ (false && false)
They also have different connotations which make it more readable to use one over the other in certain scenarios as mentioned in previous posts.

@dalexeev
Copy link
Member

See also godotengine/godot-proposals#230.

@groud
Copy link
Member

groud commented Dec 19, 2019

Ah yes, this one is still open, so please continue the discussion there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants