4 ms·
You're being snarky, but I think there's something to the parent comment. I like the idea that most of the words that someone sees in a program are words in th
by munificent 9y ago
You're being snarky, but I think there's something to the parent comment.
I like the idea that most of the words that someone sees in a program are words in the domain of the program itself — its nouns and verbs — and not words in the domain of the underlying implementation language.
For example, though I visually like the way Ruby's "begin" and "end" look for delimiters, I think braces are better in that they reduce the "word clutter" of the code.
You can probably take this too far. I wouldn't want to use punctuation for control flow. But perhaps that's an argument that, like Smalltalk, control flow should be an API and not built in syntax.
- seanmcdirmid 9y agoSyntax highlighting usually is used to set apart the language's keywords from the rest of the program. They become less like words and more like standard symbols.
- smt88 9y agoI agree. I prefer to have both. It's hard to argue that either SQL or Brainfuck is more readable than, say, JavaScript (to an experienced eye), so a happy medium must exist.
- munificent 9y agoGreat point! One of the things I really like about syntax highlighting is this separation. It's important enough that when I'm toying with syntax for my hobby languages, it's really hard for me to get a feel for how something looks if it isn't highlighted correctly.
- uryga 9y agoI agree! Anecdotally, I prefer `x >>= y` over `x .then y`, and `f <$> xs` over `map f xs` because the symbols "read quieter" to my mind, which helps me maintain focus.
- seanmcdirmid 9y agoThose aren't so bad if you have something like hasklig installed. But otherwise the stilted typography just drives me crazy.
- macintux 9y ago> I think braces are better in that they reduce the "word clutter" of the code. I prefer Erlang's approach: dispense with the words and the braces. Unfortunately Elixir decided words were friendlier.