3 ms·
really really short things, it ends up being shorter than the names you would use, so you can just write the thing rather than your name for it I inherited a k
by nivertech 7y ago
really really short things, it ends up being shorter than the names you would use, so you can just write the thing rather than your name for it
I inherited a kdb/q codebase like this, the problem with it, is that when you making a change, you need to find all these little code snippets and change them.
You need to rely on TDD to make it work, and this doesn't really scale to large projects.
Much better strategy if you don't want to name functions, is to use their hash.
But still conventional approach of choosing meaningful (longer than 1-2 letter) identifiers and writing comments works much better.
Also the same expression in q can represent several different things, i.e. a symbol might be a name of the column in the table, a key in the dictionary, an enum, a string, a constant, a global variable, etc. Without naming it, after a week you will no longer remember the original meaning.
To add salt on injury - you are limited on the number of global constants (really variables) you can use, so it's not always possible to name everything.