3 ms·
I think syntax highlighting probably evolved before editors and IDEs could flag coding mistakes. A lot of the rationale for it no longer applies, e.g. coloring
by twblalock 10y ago
I think syntax highlighting probably evolved before editors and IDEs could flag coding mistakes. A lot of the rationale for it no longer applies, e.g. coloring strings a certain way so if you forgot the terminating quotation mark, the rest of the file would change to that color and you'd know you screwed up.
I haven't used syntax highlighting for years. My IDE highlights mistakes and compiler errors, and everything else is black. It's actually a lot easier on my eyes, and the errors stand out a lot more because they are the only colored parts of the text. I only use highlighting these days to separate tags from content in markup languages like XML and HTML, where I still find it helpful.
This is all personal preference anyway, and it doesn't matter very much. But I do encourage people to try going without syntax highlighting for a few days. You may find that you didn't really need it, or that it was compensating for sloppy coding, and you may not want to switch it back on at the end of the experiment.