3 ms·
A general comment, noting related to any specific language. The mental unpacking to read does improves over time, as you get familiar with frequently occurring
by srean 10y ago
A general comment, noting related to any specific language.
The mental unpacking to read does improves over time, as you get familiar with frequently occurring patterns. But what I find more interesting is the "write" side of the story, not the "read" side. I have encountered many who think just because the code is short and succinct it must have taken no more than a jiffy to write. It takes mental effort to distill a complex idea to a short idiomatic string.
What you get rewarded with after that exercise is less space for subtle bugs to hide. It is quite difficult to write very short pieces of code with non-obvious or subtle bugs.
- kwhitefoot 10y agoJe n'ai fait celle-ci plus longue que parce que je n'ai pas eu le loisir de la faire plus courte. I would have written a shorter letter, but I did not have the time. Provincial Letters : Letter XVI (4 December 1656) via https://en.wikiquote.org/wiki/Blaise_Pascal https://en.wikiquote.org/wiki/Blaise_Pascal
- taneq 10y agoTrue, it's applicable to any language which aims to be dense in this way - just something that's been bugging me. Unpacking ability certainly improves over time. The problem is, so does packing, such that they tend (at least in my experience) to balance out. The time taken to write, and read, code is dominated by the per-concept costs. So you end up with the writer and the reader of the code still taking the same amount of time per concept, but they're also doing a bunch of translation steps alongside. Since these steps are fallible, you've reduced the overall efficiency. There's not less space for subtle bugs to hide. The space is just folded up, and bugs can also hide in between the folds.
- greggirwin 10y agoAgreed. We can't say that packing is universally good or bad. You can have a dense tangle or distilled elegance.