In general, q permits, but does not require, whitespace around operators, separators, brackets, braces, etc. You could also write the above expression as
a : 42
Because the q gods prefer compact code, you will see programs with no superfluous whitespace...none, zilch, zip, nada. In order to help you get accustomed to this terseness, we use whitespace only in juxtaposition and after semicolon and comma separators. You should feel free to add whitespace for readability where it is permitted, but be consistent in its use or omission. We will point out where whitespace is required or forbidden.
Reprinted with the author's permission from: q for Mortals Version 3, An Introduction to Q Programming by Jeffry A. Borror.
©2015 Jeffry A. Borror/ q4m LLC