Code Formatting f[x] preferred over (f x) ? - Kdb+ / qStudio

Home Forums Kdb+ / qStudio Code Formatting f[x] preferred over (f x) ?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #111271

    Jim
    Member

    When is f[x] preferred over (f x)?

    #111280

    For your particular example there’s little difference and I’d go with whichever is clearest given the context. e.g. If you already have lots of parentheses, square brackets may be easier to distinguish.

    (2*3+(f[x]%2))
    vs
    (2*3+((f x)%2))

    In general I recommend these style guidelines:
    http://www.timestored.com/kdb-guides/q-coding-standards

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.