Previous: , Up: infix   [Contents][Index]


3.3 Random notes on the features

About the exponentiation and bitwise xor operators

The infix macro uses ‘**’ as exponentiation operator and ‘^’ as bitwise XOR operator; this is controversial because a lot of people, especially LaTeX users, are used to think of ‘^’ as exponentiation operator. The C language has established a tradition to interpret ‘^’ as bitwise exclusive OR operator, and the Python language has adopted it; MMCK Infix sticks to it, too.

About the vertical bar

The C language has established a tradition of interpreting the single vertical bar ‘|’ as bitwise inclusive OR operator and the double vertical bar as ‘||’ as logical inclusive OR operator.

In the Scheme language the vertical bar is used in the block comments delimiters ‘#| … |#’. Some text editors for software programmers handle the vertical bar specially in Scheme mode, in particular for syntax highlighting.

It would be possible to extend the Scheme reader to allow ‘|’ and ‘||’ to be symbols, but, at present, this confuses some text editors in a way that is not easy to fix. So, for now, rather than the vertical bar, infix recognises the Unicode character vertical bar extension (‘\x23D0;’) as bitwise inclusive OR and the double vertical bar extension as logical inclusive OR.


Previous: , Up: infix   [Contents][Index]

This document describes version 0.1.0-devel.0 of MMCK Infix.