News for hackers. Stuff that matters.
Re:Tree Sitter and the Complications of Parsing Languages by Derbasti on Wednesday November 24, 2021 @06:04AM (#29328808)
A few years ago I switched my color theme to something very simple, just as an experiment.

Somehow I never found a need to change that. I highlight comments, keywords, and strings. Comment and string highlights are helpful if they contain code-like text, to make them obviously not-code. Keywords give some structure to the text.

Everything else is frivolous to me. Books do not highlight verbs in green, either.

Re:Tree Sitter and the Complications of Parsing Languages by xyzzy_plugh on Wednesday November 24, 2021 @09:06AM (#29330050)
> Books do not highlight verbs in green, either.

While I will not argue with your general point -- I also don't really need highlighting and I read a lot of plaintext code -- I wonder about this.

Would this make languages easier for non-native speakers? Would improve comprehension?

It's funny that the industry spends so much time on syntax highlighting for programming languages, when humanity's written languages are arguably more complex and difficult to parse and master.

Re:Tree Sitter and the Complications of Parsing Languages by unhammer on Wednesday November 24, 2021 @12:06PM (#29332265)
> Would this make languages easier for non-native speakers? Would improve comprehension?

When I've been trying to learn languages, I can typically part-of-speech tag unknown words quite easily (common prefixes/suffixes/word length/sentence position give lots of information – and some of this is shared across languages as well). The comprehension difficulty is nearly always due to content words I haven't seen before (or have forgotten).

Re:Tree Sitter and the Complications of Parsing Languages by Derbasti on Friday November 26, 2021 @03:45AM (#29348447)
I think the point is that books do highlight things: Headlines, italics, Capitalization. Just not silly technicalities like parts of speech.