[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [NOISE] Curly braces [was Re: Curl]
On Thursday, November 29, 2001, at 10:58 PM, Dan Weinreb wrote:
> How many of you actually know by heart the complete ranking of
> operator precedence in, say, C or C++ or Java or any of these
> lanaguges that use infix math syntax? The last time I looked, one
> usually ends up with something like twenty levels of precedence.
Of course there is also some middle ground here. Wirthian languages
use infix more than Scheme but less than Java, resulting in a nice
balance between levels of precedence vs. ease of reading. If I
recall correctly, Oberon has 5 or 6 levels of operator precedence;
things like shifting are pervasive functions instead of operators,
while stuff like & and | in C is modeled with set-like types for
which + and * are overloaded. I prefer that solution a lot. :-)
--
Peter H. Froehlich @ http://www.ics.uci.edu/~pfroehli/