Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 589 Bytes

parentheses.md

File metadata and controls

21 lines (14 loc) · 589 Bytes

Parentheses

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:

a*b+c

should not be written

a*(b+c)

Redundant parentheses are visual red herrings.

Although extra parentheses are useful as training wheels, most q programmers eventually internalize q syntax.

On encountering a parenthesized expression one assumes the parentheses are necessary. Do not burden your reader with the task of discovering that they are not.