4 ms·
Whenever syntax highlighing is being discussed, I like to plug Linus Åkesson's 'A Case Against Syntax Highlighting': http://www.linusakesson.net/programming/syn
by Crito 12y ago
Whenever syntax highlighing is being discussed, I like to plug Linus Åkesson's 'A Case Against Syntax Highlighting': http://www.linusakesson.net/programming/syntaxhighlighting/ http://www.linusakesson.net/programming/syntaxhighlighting/
Personally, I do find syntax highlighting to be useful, but I think it is an interesting dissenting opinion that is worth mentioning. OP's article mentions that Acme doesn't have syntax highlighting, but doesn't really expand on that.
- jasonm23 12y agoBetter to ask Rob Pike why it doesn't.
- shadowfox 12y agoFrom Acme Faq [1]: "No. The creator of main users of Acme find syntax highlighting unhelpful and distracting." [1] http://acme.cat-v.org/faq http://acme.cat-v.org/faq
- shadowfox 12y agoSomehow I have never found that essay very convincing. There is something to be said for clean language design and minimal, a non-distracting editing environment, of course. But the essay doesn't argue the case in any reasoned fashion. It mostly just makes emotional arguments (the talk about training wheels, the example with highlighting fiction, which is over the top). I have worked with large codebases in plain vi and PFE [1] in my wayward youth. It wasn't exactly what I would call a pleasant experience. [1] https://en.wikipedia.org/wiki/Programmer%27s_File_Editor https://en.wikipedia.org/wiki/Programmer%27s_File_Editor
- userbinator 12y agoI'm with Linus' side on this - I started writing code without syntax highlighting, and never had any problems doing so. In fact many times I use paper or a whiteboard to prototype some code I'm writing, to mentally step through it and verify that it does what I want it to. I think much of it has to do with your attitude towards programming languages and source code: do you view them as being intrinsically difficult and thus requiring special tools to handle, or think that they're not any harder than human languages to work with (after having learned and used them extensively) so it feels completely natural to read un-highlighted code like you would text in a human language? Looking at the rest of his site, you'll find that he has done an incredible amount of other interesting things too, which does increase the credibility of his argument - he doesn't use syntax highlighting, because he doesn't need it to understand his code.
- seanmcdirmid 12y agoSyntax highlighting is just a tool to eke out a few points of productivity in reading code. I know many people prefer plain text, notepad-style, but some of us like reading typeset documents where formatting (bolding, color, lines) is applied to make the document structure more pronounced. I think much of it has to do with your attitude toward typography: do you view it as being utterly pointless and devoid of value, or do you like things that don't look like featureless crap.
- philbo 12y agoAnecdotally, I've found that disabling syntax highlighting encourages me to pay more attention to how I structure my code as I'm writing it. I feel more aware of sections of code that may be getting messier as I work. I still turn on syntax highlighting when I'm reading code though, whether my own or somebody else's.
- currysausage 12y ago> Personally, I do find syntax highlighting to be useful, but I think it is an interesting dissenting opinion that is worth mentioning. I just think that syntax highlighting is usually executed really badly, often emphasizing even the least interesting parts of code in the most distracting colors. The analogy to prose is quite adequate. Randomly highlighting the different word classes in a dozen flashy colors would distract me like crazy; but nobody would argue against using a larger font for headings and a smaller one for footnotes. If I was programming all day, I would probably spend considerable time creating very subtle syntax highlighting themes for different languages (something like: slate function names, white strings, everything else grey, italic variable names). But I don't, so I usually just turn off syntax highlighting entirely.