From: "trans (Thomas Sawyer)" <transfire@...> Date: 2012-11-17T18:54:44+09:00 Subject: [ruby-core:49481] [ruby-trunk - Feature #7322] Add a new operator name #>< for bit-wise "exclusive or" Issue #7322 has been updated by trans (Thomas Sawyer). =begin It might seem like it, but designating a unit is not multiplication. (({9.81 * m})) actually means (({9.81 * 1 m})) Implementation wise this approach is a bit messier too. It requires overriding the built-in #* method and adding a slew of type methods to Object (e.g. Object#m). @stomer Using an argument for the unit power isn't a skeuomorphic ideal. But it might suffice. I need to give it some thought and take a look at the Stick code to make sure. I'll try to do that today and report back. Thanks. Speaking of a skeuomorphic ideal, do you notice that in general contexts when people give ascii examples of "power" they always use (({^}))? I don't really understand why language designers are so bent on bucking the overwhelming commonality of this choice --all solely to cling to C's tradition of using (({^})) as XOR? How unfortunate. But anyway, I digress. =end ---------------------------------------- Feature #7322: Add a new operator name #>< for bit-wise "exclusive or" https://bugs.ruby-lang.org/issues/7322#change-33012 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/