The more I used ocaml the more I found beauty in the syntax. It’s very ergonomic in many ways: 1. It’s whitespace insensitive, which means I can code something up really messy and the code formatted will automatically fix it up for me. 2. In general there aren’t a ton of punctuation characters that are very common, which is great for typing ergonomics. Don’t get me wrong, there are still a lot of symbols, but I feel…
2. In general there aren’t a ton of punctuation characters that are very common, which is great for typing ergonomics. Don’t get me wrong, there are still a lot of symbols, but I feel compared to some languages such as Rust, they’re used a lot less. I never really seen someone put that into words. I always feel a certain kind of weird when I look at a language with tons of punctuation (Typescript is good example).
Punctuation is used in written human languages to provide assistance to our brain-parsers—like road signs that help navigate a sentence. Too much punctuation and it becomes a huge problem because it ceases to be meaningful, but have you ever tried reading a Roman inscription written with no spaces or sentence boundaries?
I think programming language punctuation serves the same role—it visually marks out how the parser is going to navigate the code, allowing the reader to use less mental effort repursing code that they initially misparsed. ML-style languages have a simpler syntax than the C family, which means there is some justification for having less assistive punctuation, but I've definitely struggled to navigate OCaml as a result of too little punctuation.