3 ms·
I asked a question about the origins of the XOR operator a while back. Ken Thompson was emailed by the accepted answerer and provided a response, in fact! htt
by junon 3y ago
I asked a question about the origins of the XOR operator a while back.
Ken Thompson was emailed by the accepted answerer and provided a response, in fact!
https://softwareengineering.stackexchange.com/questions/331388/why-was-the-caret-used-for-xor-instead-of-exponentiation https://softwareengineering.stackexchange.com/questions/3313...
- totoglazer 3y agoAlso for ampersand! https://softwareengineering.stackexchange.com/questions/252023/why-does-c-use-the-asterisk-for-pointers https://softwareengineering.stackexchange.com/questions/2520...
- aap_ 3y agoI'm not sure XOR/^ was added by Ken himself because it is not in his original B language and while the earliest C compiler can parse it, it can't generate code for it. I think it was Steve Johnson or Dennis Ritchie. Now B originally did have a ^ but that stood for OR because | was in the lower case region of ASCII.