Highlighting program variables instead of keywords?
Steven D'Aprano
steve+comp.lang.python at pearwood.info
Sun Jan 26 20:29:17 EST 2014
On Sun, 26 Jan 2014 18:31:49 -0600, Skip Montanaro wrote:
> My son sent me a link to an essay about highlighting program data
> instead of keywords:
>
> https://medium.com/p/3a6db2743a1e/
>
> I think this might have value, especially if to could bounce back and
> forth between both schemes.
Hmmm, I'm not convinced, but then I wasn't convinced by syntax
highlighting either until I had used it for a while. (I still think it's
a nice-to-have rather than a must-have.)
Seems to me that beyond a dozen or so variables, the colours won't be
distinctive enough to get much benefit. Especially if similar names get
similar colours, e.g. the name "handle_process" and the typo
"handle_prosess" will be barely distinguishable. In a well-designed
program, most variables will appear in a fairly limited number of places,
possibly in only a single function or method, so in even a fairly small
project you might have a few dozen distinct variables, each of which
might appear only three or five times.
> Is anyone aware of tools like this for
> Python? Bonus points for pointers to an Emacs implementation.
Sorry, can't help you.
--
Steven
More information about the Python-list
mailing list