3 ms·
I’m really divided on this. Sometimes I feel like the fixed visual pattern of whitespace punctuated code gives strong contextual messaging about flow and struc
by K0balt 3y ago
I’m really divided on this.
Sometimes I feel like the fixed visual pattern of whitespace punctuated code gives strong contextual messaging about flow and structure, speeding up interpretation and understanding. Sometimes I feel that it’s vague.
Carefully written and well prettified character-punctuated code presents a deterministic clarity that helps to better encapsulate little chunks of functionality that become easy to identify and think in. OTOH punctuation can lead to character-soup situations where parsing exerts significant drag on comprehension speed.
I don’t know what the answer is, but in using either paradigm I find that they both have their strengths and weaknesses. I sometimes vaguely wish that this could be tweaked at the IDE level, like if you hover over a python block for a while it drops in curlies and semicolons for clarity, and if you hover over some overpunctiuated-to-the-point-of-obfuscation soup it pops out into a spacial structure that better exposes the structure being expressed.
I think it really boils down to being aware of the pitfalls of each paradigm and adjusting your coding style to minimise those impacts. But that doesn’t help when you are dropped into someone else’s codebase.
- feoren 3y ago> Sometimes I feel like the fixed visual pattern of whitespace punctuated code gives strong contextual messaging about flow and structure, speeding up interpretation and understanding. Realize that you can still do this with punctuated languages. In fact, the parser being whitespace agnostic means you have full power to use it however you deem best improves clarity, whereas whitespace-as-punctuation languages do not have nearly the same flexibility here. However much you liked fixed visual patterns of whitespace, that's an argument against whitespace-as-punctuation languages for that reason.
- K0balt 3y agoOh, yes, you absolutely can use character punctuated languages to express flow and intention , even more so than whitespace punctuation. And the people that do that well are artists of their craft. The problem is that many people seem to be unaware of code morphology as expressive documentation. To a degree, whitespace punctuation enforces expressive morphology and encourages thought in that direction. It’s like the syntax we deserve, not the syntax we want lol.