There seems to be two camps in language design: those who want to see their punctuation, and those that want their punctuation to be invisible. Python, CoffeeScript, YAML, Wisp: these languages still have punctuation. It's just spaces, tabs, and carriage returns -- all invisible. I always prefer to be able to see my punctuation, and it's very difficult for me to understand why anyone else wants the opposite.
Languages that try to be concise are like textspeak. Its fast wen u jst need 2 send throwaway msgs lol. That's what makes them popular for scripting: writing a quick script is like writing a quick text. It's "write-only". But you would never write a technical document out of textspeak: clarity is much more important than brevity. So it is with serious programming languages. It makes invisible-punctuation languages feel like toys. And yes, I'm even including Tensorflow with Python: those are still mostly "write-only" scripts that are not meant to be maintained like professional software is.
I really don't think Python is less maintainable because of its punctuation style. I worked on million lines of code systems in Python and lack of punctuation was never a problem. I think you could make a much stronger argument about lack of static type checking, which Python now offers, similar to TypeScript.
The only real pain point with indentation based languages like Python is when copying and pasting code you have to take care to put things at the right level. Tools like prettier mean this is pretty much a non-issue now for punctuation based languages. But there's still a lot of line noise to ignore when reading code.
That's good to hear, actually. I'm sure it can be done well. I've worked on much smaller Python codebases that were unmaintainable, and the lack of punctuation was one of the problems. A very common source of bugs was things being at the wrong indentation level. You'd have:
Uh oh. Is "another_func" at the right indentation level? It's very hard to tell what scope it's at. Yes, this is awful code style, and it still would be difficult even with visible punctuation, but at least you could count the '}'s to see what the programmer actually intended. Here, it's very difficult to know how many scopes just closed. They all opened five screen-heights ago! I am aware that it's easy to write hard-to-follow code in any language, but visible punctuation always helps.
it's not going to stop, and those who complain about it without curiosity about why it's such a valued language feature are doomed to suffer until the end of their careers.
at the same time, I'm somewhat interested to hear a further defense of this idea that newlines and spaces are "invisible". Is this invisible in the sense of neutrinos, or in the sense of wind blowing in the trees, or in the sense of the vacuum of space, or what?
For my part, I seem to have no trouble "seeing" line breaks, spaces between words, etc.
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.
> 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.
Oh, 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.
Languages that try to be concise are like textspeak. Its fast wen u jst need 2 send throwaway msgs lol. That's what makes them popular for scripting: writing a quick script is like writing a quick text. It's "write-only". But you would never write a technical document out of textspeak: clarity is much more important than brevity. So it is with serious programming languages. It makes invisible-punctuation languages feel like toys. And yes, I'm even including Tensorflow with Python: those are still mostly "write-only" scripts that are not meant to be maintained like professional software is.
Stop making your punctuation invisible.