Home › Forums › kdb+ › Code Formatting › Re: Code Formatting
-
Thanks for sharing @dhodgins.
Whilst I don’t necessarily agreed with all of the points based on personal preference, I do agree with the overall theme of keep it simple and consistent – both for readability and performance.
I find it’s a balancing act, for example on the projection performance, one may prefer a more tacit style approach as it can be cleaner/easier to read right-to-left the following expression:
aggFunc projFunc[var1;] calcFunc
vs
aggFunc projFunc[var1;calcFunc]
Especially if calcFunc has a longer definition and if the small performance overhead justifies it.
Your blog post and notes on style can be eye-opening and help to develop good code hygiene over the long term.