by martin_a · 7y ago · 0 comments
I find this whole article highly speculative. It's based on principles the author adapted from somebody who wrote a book about how to write code, but I doubt they really influence or apply to lots of people.
I don't value comments less or more because they are cursive or light grey. Code highlighting should help to easily distinguish between different parts of the code, but as unobtrusive as possible. This is not an easy task especially with the limited set of options you have for plain text.
I also don't perceive removals in diff view as "bad" because they are red but as "look here, could be important".
So this article is about the feelings of the author, not so much about facts.
Could you imagine the mess if you were writing an API that required JSdoc with the author's proposed highlighting scheme? Or Golang's enforcement of comments on public functions?
That's really the problem with using red for deletes in a diff. Red implies that the deleted lines are more important than the added lines, and that's wrong. You shouldn't (and can't really) focus exclusively on the deleted code. Breaking the 'red = important' connection and using a color scheme that gives equal weight to the removed and added lines may well work better once you get past how weird it is.
I've never gotten that impression. I and my coworkers & classmates usually highlight text using the standard yellow highlighter, occasionally using other snazzy highlighter colours - red sometimes included, but usually not.
The associations that leak in from other domains are green=good/go, red=bad/stop. It's very easy to mentally remap the colours to the intuitive green=new, red=old.