Ask HN: Sound-based syntax highlighting – what do you think?
I want to drop here an idea that is bouncing in the back of my head for some years already, and that I absolutely, positively won't have time to test in upcoming months.
We all have experienced the benefits of syntax highlighting in our editors. Apart from increasing readability, it helps spot typos the moment they're made. I bet most of us have internalized it into an almost subconscious reaction like "hey, that keyword I just wrote didn't turn blue, I must have made a typo".
I was thinking about using sounds to achieve a similar effect. Say you're typing a keyword, the moment you type the last letter and make a whitespace, your editor plays a sound. You expect it to be played, so if you don't hear, you immediately know you've made a typo.
One could introduce different sounds for symbols, numbers, strings, opening/closing parens, and maybe even bigger semantic constructs. You get slightly different sound when you close a function, when you close a class, etc.
One would have to make sure those sounds are non-distracting. Fortunately, one is rarely annoyed by the sounds of one's own typing the keyboard makes, so this suggests it is possible to achieve this goal.
One slight twist I though about is to make every keystroke make a sound, with a pitch increasing with the speed of your typing, to make people like typing faster more :).
The simplest way to test it would probably be to write an Emacs exension, given the great facilities this editor has for plugging into the typing process, including recognition of semantic constructs. Unfortunately, as I said, while I'm dying to test this, I have other projects right now and a thesis to finish; maybe someone will give it a shot though.
Still, I'd appreciate any comments regarding use of sound as an additional sensory input to a programmer's brain.