3 ms·
Since learning clojure I've really come to appreciate that descriptive names are better than short ones. It depends on context, but many-named-functions exhibi
by sova 11y ago
Since learning clojure I've really come to appreciate that descriptive names are better than short ones.
It depends on context, but many-named-functions exhibit-long-groupings for-sake-of-clarity. It's easier to come back to code months later and know what's going on. If you are doing simple math, like a dot product, naming your vectors u and v is not a big deal that much is obvious.
However, if you have to document out what a variable stands for, you might as well use a long name; bytes are cheap, addresses/references are internally the same length they would be whether or not you named the variable g or george-harrison, and humans are the ones reading and editing it, not robots.
I would argue that longer is better, for the above reasons, and that is one big difference between 16-year-old coder-me and current-coder-me.