2 ms·
In practice, I usually choose a colour scheme based on how important the comments are. There exist plenty which either emphasise or de-emphasise the comments, j
by unfamiliar 12y ago
In practice, I usually choose a colour scheme based on how important the comments are. There exist plenty which either emphasise or de-emphasise the comments, just choose one that is appropriate for the way your project is commented. And I disagree that all of those comments you removed are useless. They make the code far more readable and remove any ambiguity about what is represented by the variables.
>Why, then, are we psychologically rewarding additions with green, and punishing deletions with red?
I'm sorry, but this is absurd. And with regards to the replacement blue/yellow scheme:
> Perhaps it’s not as pretty, but it’s more usable
It is far less usable. I glance at the red/green and know immediately which is which. I have no idea whether yellow or blue is deletion or insertion at first glance.
This post could have touched on much more, for example: should we really be highlighting keywords, shouldn't we just be emphasising flow control and identifiers? There are many interesting ideas to be explored in this area, such as highlighting rvalues/lvalues in C++, highlighting scope instead of keywords, etc.