5 ms·
For some reason, julia has no ascii infix xor. That is, you can write `xor(a,b)` or `a ⊻ b` (`^` is taken for "raise to power").
by leiroigh 8y ago
For some reason, julia has no ascii infix xor. That is, you can write `xor(a,b)` or `a ⊻ b` (`^` is taken for "raise to power").
- guitarbill 8y agoHow do you type "⊻"? I think it'd rather avoid a language where I can't type all the operators. Still, could be worse, some languages allow unicode identifiers, and fun ensues. (You can allow unicode to appear in source files - either in inline documentation or strings - without allowing unicode identifiers. But even in languages that support this, I usually escape non-ASCII characters)
- thaumasiotes 8y agoWhere did ⊻ come from? The only symbol I ever learned for xor was ⊕. (Though I see that according to wikipedia, "It is symbolized by the prefix operator J and by the infix operators XOR, EOR, EXOR, ⊻, ⩒, ⩛, ⊕, ↮, and ≢.")