2 ms·
Interesting! Just for fun I tried to list all binary operators to check which comply with this rule. These symmetric symbols represent symmetric operators in o
by teo_zero 3y ago
Interesting! Just for fun I tried to list all binary operators to check which comply with this rule.
These symmetric symbols represent symmetric operators in one or more widespread languages (C-like, Basic, etc.), so they're OK:
+ * | ^ /\ \/ == === <> =
(where = is test for equality, not assignment).
Conversely, these asymmetric symbols represent asymmetric operators, also OK:
/ % -> => << >> < <= > >= , := \ &&
plus all the assigments like +=.
Now the bad ones, symmetric symbols for asymmetric operators:
- = ** ^ || . :: ..
(where = is assignment, ^ is exponent).
And finally the few asymmetric symbols for symmetric operators:
& !=
I'm probably missing a lot of other operators...