News for hackers. Stuff that matters.
Re:Go 1.27 by tester457 on Wednesday August 19, 2026 @05:49PM (#49367652)
> Syntax highlighting is juvenile. When I was a child, I was taught arithmetic using colored rods (http://en.wikipedia.org/wiki/Cuisenaire_rods). I grew up and today I use monochromatic numerals.

https://groups.google.com/g/golang-nuts/c/hJHCAaiL0so/m/kG3B...

Re:Go 1.27 by IshKebab on Wednesday August 19, 2026 @06:13PM (#49367881)
That must be why traffic lights and electrical wires and transit maps are all black and white...
Re:Go 1.27 by abtinf on Wednesday August 19, 2026 @06:45PM (#49368138)
That’s an interesting point.

The reason traffic lights are colored is because they are showing distinct states of the same thing and the color is the means of differentiating.

Same for transit maps: different routes are colored to distinguish them from other routes, which is especially useful if they overlap.

But that’s not what syntax highlighting does.

The equivalent of your examples would be to not highlight the syntax at all, but only use color coding to distinguish variables.

The equivalent of how syntax highlighting currently works for your examples would be if the light fixture was one color, and the light pole was another, but then all the actual lights were the same color.

I actually think highlighting only the variables with distinct colors could be extremely valuable. Would certainly help avoid mistakes with nested i/j loop counters.

Edit to add: come to think of it, it would have been even more valuable in Go, until recently anyway. The variable color coding would expose the common loop variable instance bugs, because a programmer would be instantly puzzled by the unexpected coloring.

Re:Go 1.27 by IshKebab on Wednesday August 19, 2026 @07:22PM (#49368472)
That does exist, it's called semantic highlighting.

In any case, my analogy was not perfect, but neither was Russ's! The point is it's totally normal and not "childish" to use colours to help distinguish things. Traffic lights do not technically need colours (you can use the position of the lights - I assume that's what badly colourblind people do). Nor do transit maps technically need colours - you could just label the lines, or use patterns.

https://www.flickr.com/photos/gywst/1407078279

It's completely absurd to say that colours are childish because they can help children.

Re:Go 1.27 by wgrover on Thursday August 20, 2026 @12:48AM (#49370476)
Your comment makes me think of LabVIEW - if you're not familiar with it, it uses a visual programming language ("G") in which data flows down wires. The color of the wire indicates the wire's data type (blue for ints, orange for floats, green for bools, pink for strings) and the width of the wire indicates the dimensionality of the data (thin line = scalar, thick line = 1D array, double-thick = 2D array). The color is more than decorative or even assistive - it's essential to understanding the program.
Re:Go 1.27 by DeepSeaTortoise on Thursday August 20, 2026 @02:20AM (#49371033)
I still wonder why every open-source visual programming language is either a toy for teaching or straight up awful, often not implementing but even loops, when LabVIEW has been doing it right for decades.

Despite its huge size and it installing several services that constantly run in the background, it's still one of my favorite "languages" of all time. It's the only one I've ever seen people going from never having programmed before to making simple but meaningful contributions in within a single day.

Re:Go 1.27 by sneak on Thursday August 20, 2026 @04:44AM (#49372010)
There are a bunch of identical things on my screen called lines. They contain a bunch of mostly identical things called tokens. Syntax highlighting uses different colors to identify the different purposes of all of these tokens blasted onto my screen.
Re:Go 1.27 by nopurpose on Thursday August 20, 2026 @05:24AM (#49372303)
> The reason traffic lights are colored is because they are showing distinct states of the same thing and the color is the means of differentiating

I wonder if traffic lights were invented today, would it be just one light changing colour?

Re:Go 1.27 by poncho_romero on Thursday August 20, 2026 @10:46AM (#49375366)
As a red-green colourblind person I hope not!
Re:Go 1.27 by wredcoll on Wednesday August 19, 2026 @09:43PM (#49369504)
I want to downvote this for being one of the stupidest things I've read this week but you're just quoting it so I guess I'll just seethe silently.
Re:Go 1.27 by mathisfun123 on Wednesday August 19, 2026 @10:26PM (#49369734)
never discount the possibility of so called brilliant people having dumb AF takes.
Re:Go 1.27 by whack on Wednesday August 19, 2026 @09:54PM (#49369566)
Wow, that thread is a piece of work

> Gofmt was written to reduce the number of pointless discussions about code formatting. It succeeded admirably. I'm sad to say it had no effect whatsoever on the number of pointless discussions about syntax highlighting, or as I prefer to call it, spitzensparken blinkelichtzen.

> When I was a child, I used to speak like a child, think like a child, reason like a child; when I became a man, I did away with childish things.

I sincerely hope Rob Pike was being sarcastic/ironic, because otherwise, he sounds insufferable

Re:Go 1.27 by whateveracct on Wednesday August 19, 2026 @10:14PM (#49369665)
he is insufferable. it's his thing lol.
Re:Go 1.27 by gizzlon on Thursday August 20, 2026 @03:21AM (#49371470)
> because otherwise, he sounds insufferable

Oh come on, I like syntax highlights, but this is not "insufferable". It's just opinions expressed strongly, with probably some tounge-in-cheek

Re:Go 1.27 by philote on Thursday August 20, 2026 @10:26AM (#49375039)
He sounds insufferable because he's calling syntax highlighting childish. Not simply politely saying it's not his thing. It's like he can't understand why anyone else would use it, or isn't bothering to. Maybe there's more nuance to what he said, but it's not obvious from the quote.
Re:Go 1.27 by wredcoll on Thursday August 20, 2026 @11:21AM (#49375914)
"I prefer to code in black and white only"

"Everyone who uses syntax highlighting is a child"

I mean, maybe he was genuinely trying to make a joke, but I'm well past the point of assuming random strangers are joking when they're being offensively dumb.

Re:Go 1.27 by latexr on Thursday August 20, 2026 @10:57AM (#49375562)
Re:Go 1.27 by qwm on Thursday August 20, 2026 @01:08PM (#49377325)
this is hilarious