Issue #7322 has been updated by trans (Thomas Sawyer).


Given the rejection of #7336, I would ask this this issue be more seriously considered. Personally, I don't really care if #^ continues to mean bitwise xor for numerics, but at least raise its precedence to be the same as #**, and provide an alternative xor operator with the present precedence. Whether `#><` is a good choice or not, I am mostly indifferent. (I suppose alternatives might be `#~` or `#!` which are unary operators, but have no binary definition.)

----------------------------------------
Feature #7322: Add a new operator name  #><  for bit-wise "exclusive or"
https://bugs.ruby-lang.org/issues/7322#change-32936

Author: alexeymuranov (Alexey Muranov)
Status: Open
Priority: Low
Assignee: 
Category: 
Target version: 


=begin
I propose to alias (({Fixnum#^})) and (({Bignum#^})), which stand for bit-wise "exclusive or", with a new operator name (({#><})).

Is it necessary to go along with C, Python, and Mathematica?
According to Wikipedia ( http://en.wikipedia.org/wiki/Exclusive_or#Alternative_symbols ), the "^" symbol is not used for XOR outside of programming context.

Here are some examples of mathematical notation: http://mathworld.wolfram.com/XOR.html (there are also examples in the Wikipedia article).

The Unicode symbol is "???".

If eventually (({Fixnum#^})) as XOR is deprecated, this will liberate this symbol for other uses, for example for all kinds of exponential notations (for me, "a^n" usually means "the n-th power of a").
=end



-- 
http://bugs.ruby-lang.org/