5 ms·
I'm surprised how many people don't like syntax highlighting. I appreciate it because it helps me eliminate a small class of errors while coding, which is missp
by BrandonM 19y ago
I'm surprised how many people don't like syntax highlighting. I appreciate it because it helps me eliminate a small class of errors while coding, which is misspelling keywords and improperly delimiting expressions. In Python, for example, there are 4 different ways to delimit strings, so having syntax highlighting indicates quickly to me when I accidentally ended a multi-line string with a """ instead of what I began it with: '''.
I also find myself doing weird things sometimes when I get tired, like instead of saying "class Foo", I'll type "def class Foo". Seeing the keyword "class" stand out in the second instance is a quick clue that I'm doing something stupid.
There are also cases where I've unthinkingly wanted to name a variable the same as a keyword. Without syntax highlighting, I would have received a strange error at compile time complaining about invalid syntax, but instead, I see right away what I've done and avoid the problem altogether.
In the end, it's not a matter of whether or not I know my code or know the language inside and out. It's simply a matter of quickly and effectively fixing a large majority of small gaffs in my thinking and inadvertent mistakes. Call it a crutch all you want, but you could just as easily say that if you're not coding in hex, you're using a compiler as a crutch. What's wrong with making your job easier?