https://en.wikipedia.org/wiki/All_caps#Readabilityhttps://uxmovement.com/content/all-caps-hard-for-users-to-read/https://practicaltypography.com/all-caps.html> from my experience having a visual clue that a value is a constant or an enum is something pretty useful.
Do you have any proof that it's useful? Have you ever been tempted to modify math.pi or math.e simply because they're lower case? Have you ever stopped to wonder if those values change?
If the
socket library used
packet_host,
packet_broadcast, etc. instead of
PACKET_HOST,
PACKET_BROADCAST,
ETC. would you be confused about whether it's a good idea to rebind those variables? Would you be tempted to write the line of code:
socket.packet_host = x?
It seems to me that nobody is actually considering what I'm actually talking about very carefully. They just assume that because all caps is used to convey information that information is actually important. Not just important, but important enough that it should be in PEP-8. They say I should just violate PEP-8 because it's not strictly enforced. It is strictly enforced in workplaces. I don't see why it can't be the other way around: PEP-8 doesn't say to use all caps, but if you want to it's OK.
> Surely, I'd hate reading a newspaper article where the editor generously sprinkled upper case words everywhere
Exactly. If it's an eye-sore in every other medium, then it seems likely to me, the only reason programmers don't consider it an eye-sore is they've become inured to it.
> but analogies only go so far, reading code have some similarities with reading prose, but still is not the same activity.
CAN you articulate what is DIFFERENT about READING code that makes the ALL CAPS STYLE less offensive?