Highlighting program variables instead of keywords?

S

Skip Montanaro

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. Is anyone aware of tools like this for Python? Bonus
points for pointers to an Emacs implementation.

Thanks,

Skip
 
S

Steven D'Aprano

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.
 
T

Terry Reedy

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.)

When my fingers get a bit fumbly, I find it more useful. When I do not
hit ' or " solidly, or type a mismatch 'something", having the string
literal color continue is a handy clue. So is 'it' not getting the
keyword color that if would.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top