4 ms·
You can interpret the opinions about syntax highlighting, color schemes, tabs vs. spaces, etc. as controversial, if you think one programmer's preferences amoun
by gregjor 4y ago
You can interpret the opinions about syntax highlighting, color schemes, tabs vs. spaces, etc. as controversial, if you think one programmer's preferences amount to a dictate everyone must follow. Otherwise they reflect nothing more than personal preferences.
You could also interpret those preferences as controversial if, for example, syntax highlighting or color themes had a body of empirical evidence showing they aided productivity, and Russ Cox fell on the wrong side of the evidence.
Programmers feel very strongly about these things. I consider them mostly cosmetic. I don't use Acme, but in vim I have syntax highlighting and color schemes turned off, always use tabs for indenting, don't use code folding, rarely use auto-completion. Other programmers I know have different preferences. No controversy because neither of us can base our opinions on evidence.
- kazinator 4y agoIf credible, scientific evidence shows someone's preferences as being the wrong, suboptimal ones, then in fact that makes them noncontroversial; I'm not going to maintain the controversy by arguing with that person beyond conveying to them the existence of the research. We have controversy where we don't have facts, or where they are willfully rejected.
- gregjor 4y agoWhat one person considers optimal may not work for someone else. Optimal in the context of programmer productivity is a subjective measure or opinion, not a quality always improved for everyone by something like syntax highlighting. I would venture that Russ Cox and Rob Pike (who dismissed syntax highlighting more strongly than Cox, calling it "juvenile") have demonstrated productivity far greater than the majority of programmers. I believe Linux Torvalds uses uemacs, which doesn't have syntax coloring. What other productive programmers use, or don't use, may not persuade anyone but I think such examples show that the relationship between syntax highlighting and actual programmer productivity may be weak, or more subjective than some people think.
- kazinator 4y agoSyntax highlighting can not only colorize program tokens, but it can flag syntax errors. The first character of bad syntax is shown in some loud color, like black text on red background. Would you say that this is also of no help, and prefer to turn it off? This prevents you from doing a round trip through the compiler for many an error. (Or, in some systems, it actually doesn't; the compiler may be involved in determining syntax highlighting and pinpointing the first error, but it's done in real time under the hood as you type. You're not running a build and finding about the error in a log message.)
- gregjor 4y agoI would say that syntax highlighting, including flagging syntax errors in real time, is not useful enough to me to incur the overhead of linting the code in real-time, these days often requiring a language server. I have my editor set to lint the code on save. Other programmers may find real-time syntax checking useful. Showing possible syntax errors in the code during editing doesn't require full syntax coloring. I understand that syntax coloring can also show syntax errors, but the two features are independent, and you can flag errors without turning the editor window into a kaleidoscope.