Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Old people syntax hilighting

Name: Anonymous 2008-03-23 13:43

I've noticed that most of my professors don't use syntax hilighting in VIM. They will either use white on black, or green on black. Does /prog/ think that this makes them worse programmers?

Name: Anonymous 2008-03-25 1:09

Interesting topic...

Have you ever heard someone complain that they can't read Lisp? I don't mean because of the parentheses, but because it's very regular. You have to rely on context to interpret the meaning of the code. The visual aspects don't immediately reveal to the reader what it all means.

Take the simple example of Visual Basic. What does foo mean? Is it a procedure/function call, or a variable, or what? There's no visual clue. Compare this to C's foo vs. foo().

In Lisp, pretty much the only visual clues you have are (foo) is "call the procedure/macro foo" and foo is "the variable foo".

At first I thought these complainers were just stupid because they couldn't read Lisp. But after some thought, I realized that some people just really find it difficult reading contextual language, and maybe it was a valid complaint.

Other visual clues are more helpful for the meaning of blocks of code for viewing at a distance, or quickly. The prime example, of course, indentation. In Lisp, good indentation is very important for reading. And pretty much in most languages, if you want your code to be seen rather than deciphered.

This brings me to colors (or bolds/highlight/etc). Personally, I prefer very few colors in my code. I'll permit dark grays. I find highlighting quite distracting sometimes. But I do believe that for some people, colors have use like indentation. Colors can be used to make people write correct code, and colors can help people read code better. Take the example of parenthesis matching. For a Lisper, it is very useful. For other programmers, even, it is still useful.

Finally I would like to say that someone supposed that being reliant on the computer is bad. I disagree. Let me preface by saying that by "reliant", I mean using the computer to be helpful with our mistakes, not that we can only write code with a computer and otherwise we are helpless. We let the computer do things that are a waste of time for us. If I look at another person's piece of code, is it immediately obvious to me that there is an unterminated string constant? If I have syntax highlighting, it sure is. Why should I have to scan through it myself just to validate the syntax? People write programs with compilers, references, editors, an internet connection and Led Zeppelin. Wanting a computer for syntax highlighting isn't an issue. It's there because people make mistakes; it's part of being human. This is why compilers do syntax checking. I don't presume your argument is also that a compiler shouldn't do syntax checking because the human can do that?

This is a long post, but the subject interests me.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List