Hacker News new | ask | show | jobs
by fmueller 3517 days ago
The difference here is that on a traffic light the colors are important and inherent to the traffic light's functionality.

This is not true in source code. Syntax highlighting "helps" you to spot strings, numbers, keyword arguments etc. faster. But normally this is not what programming is about.

2 comments

> The difference here is that on a traffic light the colors are important and inherent to the traffic light's functionality.

They're really not. See also: millions of red-green colorblind people.

The top one is stop, the bottom one is go.

I think you've done a better job supporting the other side. The direction and order is important and inherent to the traffic lights functionality, not the color. The color merely helps identify state. Colorblind people can drive fine without knowing which is red and which is green.

The point of colors in syntax highlighting, to me, is not to have a handicap, it's to read the code at the fastest speed possible. No one who is so new to an editor or a language should have the unrealistic expectations to understand the colors and read at full speed in their first hour of gazing.

When you talk about reading the code then you mean parsing? When you think you gain productivity by parsing the code in strings, variable assignments, function calls, numbers etc. then syntax highlighting is good for you. But I don't think a programmer gains anything from this.