Skip to content


Avoid unnecessary parentheses. The grammar of q is simple and there is no precedence order for the primitives. For example, the expression to multiply a by the sum of b and c:


should not be written


Redundant parentheses are visual red herrings.

Although extra parentheses are useful as training wheels, most q programmers eventually internalize the preferred method of reading q, which is left to right. To encounter a parenthesized expression is to assume that the parentheses are necessary.

Back to top