-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Missing operator ^ for bool type #20001
Comments
Why will |
Why not? It's a standard operator for boolean logic in every program language... |
Into the documentation the XOR operator is presented as !=. Ok, but it is very disorienting to follow a different convention. |
I haven't seen this as an operator for bools... Look at Go: |
In rust is defined as is. I think... |
Go example: package main
import "fmt"
func main() {
a := 19
b := 21
c := a ^ b
fmt.Printf("The Value of c is %d\n", c)
} Output is |
Thanks for the explanation. |
Describe the bug
bool types doesn't have a xor operator
Reproduction Steps
Expected Behavior
Program compiles
Current Behavior
Compilation ends with error: bool types only have the following operators defined:
==
,!=
,||
, and&&
Possible Solution
No response
Additional Information/Context
No response
V version
V 0.4.3 bc62c5c
Environment details (OS name and version, etc.)
V full version: V 0.4.3 8f76a06.bc62c5c
OS: linux, Ubuntu 22.04.3 LTS
Processor: 4 cpus, 64bit, little endian, Intel(R) Core(TM) i3-7100 CPU @ 3.90GHz
Note
You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.
The text was updated successfully, but these errors were encountered: