Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
A case against syntax highlighting (linusakesson.net)
3 points by jwdunne on Sept 3, 2014 | hide | past | favorite | 3 comments


"Conclusions[...] Syntax highlighting doesn't improve legibility."

Yes. And the author completely missed the point of syntax highlighting: it's not useful to read the code, it's useful to WRITE the code!

It's when writing it that you want some early syntactic (and slight semantic) feedback.

If you type a keyword and it highlight like a function name, you get a hint that you have a typo in your keyword.

If you type a function name and it highlight as a type, or as an undefined token, you get the same hint.

And so on.

Just like automatic indentation of the code does provide you good syntactic hints about your parenthesizing (or brackets or begin/end etc), and let you notice at once when something's unbalanced or misplaced.

(This is also the reason why python is bad: editors can't do automatic indentation of python code.)


Editors can, and normally do, automatically indent Python.


This is a much stronger case against highlighting English and against using really nasty themes, which no one considered good ideas to begin with.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: