Comments

2009-04-06
Erdferkel
Well, when I started programming C for money I read a few style guides, and almost all of them said something in the line "Never assume operator precedence, always use parentheses, even if it looks like LISP". If I should design a programming language, it won't have well-defined operator precedence. For every unintuitive, ambiguous statements (like "x==y&z"), the precedence will be chosen randomly -- at evaluation time. The first few times, the interpreter will use a uniform distribution, so finding the cause of the problem should be easy. In case the programmer does not learn, the language will switch to a non-uniform distribution, to make the program seemingly reliable and the bug hunt more painful, as greater pain causes the lessons to be more memorable.

New comment