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


=begin
@matz

Reference given below[1], but I can give very brief summary to save you time...

Stick is an SI units system for Ruby. While in pure math there is just one type of "power" (in Ruby provided by (({#**}))), in physical systems there is also units and units themselves can have "power", e.g. cubic meters. So any good units system therefore ((*needs two power operators*)), one for the value and one for the unit. The natural notation for these are, e.g.

    10.m**3   (10 meters * 10 meters * 10 meters)
    10.m^3    (10 cubic meters)

But precedence of (({#^})) is too low in Ruby to do this well, e.g.

    10.m^2/2  => 10 meters, instead of 5.m^2

Nor is there some alternative operator to utilize.

Unit powers is a common real word application, so I think it is not unreasonable to seek that Ruby be able to accommodate such a use case.

In short, for me to create the best SI units system I can for Ruby, I need another power operator.

[1] https://github.com/trans/trans.github.com/wiki/2009-12-13-a-failure-of-precedence
=end

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

Author: alexeymuranov (Alexey Muranov)
Status: Rejected
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/