2 ms·
I've not found that Alice analogy colorizing the "verbs" convincing. With human language like English, we learn it and use it without the formal grammar++. A
by jasode 11y ago
I've not found that Alice analogy colorizing the "verbs" convincing.
With human language like English, we learn it and use it without the formal grammar++. A 5-year old child can speak to her mother ("I want some candy!") without conscious knowledge of "verbs" or "nouns". A formal grammar for categorization is what we layer on top of language for analysis in school. Two people can communicate and understand each other without any exposure to any grammar lessons. So yes, colorizing verbs looks superfluous and noisy.[2]
On the other hand, computer programming syntax starts with grammar. You learn that certain specific tokens are "data types" and other tokens are "literals", etc, etc. And that grammar categorization in programming languages never goes away as you're typing out new code. (Otherwise, you'd get a compiler error or unintended behavior because x="3"+"5" with quotes ("35") means something different from x=3+5 without quotes (8).) This is why so many programmers find color highlighting helpful even if they've been programming that language for 10+ years. Sure we want to focus on higher cognitive purpose of "semantics" but the grammar is deeply intertwined with reconstructing what the semantics is.
A closer analogy of color highlighting in a different realm would be different colors in TCPIP traces such as "red" highlighting external ip addresses. This can be helpful for forensics of malware phoning home.
Or in financials dashboards where uptrends are "green" and downtrends are "red".
The same reasons that colors help the malware analyst or stock trader quickly parse data at a glance is also how it helps programmers.
++ (at least not consciously that a 5-year old would be self-aware of it. A theory of innate universal grammar in the brain by Chomsky isn't what I'm talking about.)
[2] except for rare examples of using annotation or coloring of verbs to help parse sentences like this:
https://en.wikipedia.org/wiki/Buffalo_buffalo_Buffalo_buffalo_buffalo_buffalo_Buffalo_buffalo https://en.wikipedia.org/wiki/Buffalo_buffalo_Buffalo_buffal...