5 ms·
The comparison with prose is pure nonsense. Syntax highlighting is about understanding structure. I could blur out my editor to the point where I could not ma
by xondono 5y ago
The comparison with prose is pure nonsense.
Syntax highlighting is about understanding structure.
I could blur out my editor to the point where I could not make out individual letters and still understand the code structure.
When reading prose you don’t care about structure, especially not in English (in latin languages structure is way more important).
It’s important to have a good highlighter though. STM32cube IDE has a very bad highlighter that gets confused sometimes.
I’ve seen people chasing simple bugs for far too long just because the highlighter was broken.
- jonplackett 5y agoYeah the logic does not follow that highlighting prose means highlighting code is bad. I think the main benefit to highlighting code is it’s one less task my brain has to do, freeing it up to think about the structure of the code in writing and the bigger picture. Searching your code for that our of place ‘ is no benefit to anyone.
- SkipperCat 5y agoAgreed, but structure is prose is important too. Who wants to read something that is not broken into paragraphs, has not capital letters to indicate sentences, etc.
- caconym_ 5y agoThis actually has me wondering if some version of "syntax highlighting" could make prose easier to read.
- Jtsummers 5y agoSome language teaching software does use syntax highlighting for specific lessons. Rosetta Stone at least does, where it specifically highlights things like noun/adjective agreement, verb conjugation agreement with pronouns and names (io pago, capello rosso [italics for highlighting since we can't color text here]). And then we use various types of brackets, bold, italic, dashes and commas, and other things to isolate what we write. If I want to emphasize something, on HN, I use a pair of asterisks around the text: *emphasize*. We use all sorts of typographical conventions to draw attention to the things we want emphasis drawn to or to encode some notion. In many novels, in English at least, a character's thoughts are italicized rather than quoted. The noir detective might be found at his desk thinking, I knew I'd seen her before, but no name came to mind. In textbooks you have a mix of bold and italics used to identify specific kind of content. Bold for new keywords students of the book should keep in mind, usually adjacent to a definition. Italics might indicate a name assigned to something: Using the pumping lemma we can... Perhaps in our code editors we've overdone highlighting, or coloring could be a poor (certainly for some colorblind readers) method of highlighting, but syntax highlighting itself can make a great deal of sense. It's worth considering that in the examples from prose, we usually don't draw attention to syntax, but to semantics. What does the thing with different typography mean, why is it given that special formatting or why is it surrounded by special brackets, dashes, or quotes. We don't highlight (as in the example in the article) nouns one way, verbs another, adjectives a third, and adverbs a fourth. Or verbs different ways depending on the tense or number. We highlight individual words in some manner to bring attention to them, or groups of words to indicate their logical separation in some sense from their surroundings.
- jonplackett 5y agoWhen you’re reading a book out loud to a child one thing that matters is who is talking (so you can do their voice) so colour-coding characters would be nice!
- dschuessler 5y agoIt might help identifying arguments. It's a huge cognitive load to identify the premises and the conclusion of an argument.[0] I've seen quite a few philosophers using text markers to help themselves navigate through arguments in prose. [0]: https://philpapers.org/archive/DAVCAM-8.pdf https://philpapers.org/archive/DAVCAM-8.pdf
- xondono 5y agoYeah, but that’s not syntactical structure. When you read prose you aren’t thinking about subject, verb, and predicate, because semantics are far more important.
- chrismcb 5y agoYou hit the nail on the head. The author seems to be saying syntax coloring is bad, because you don't do it for prose. But you read code differently than you read prose. Syntax highlighting also doesn't make you focus only on the syntax. That is just absurd. It actually does the opposite. You actually play less attention to the syntax. As an experienced coder syntax highlighting makes my job easier