[Python-ideas] Visually confusable unicode characters in identifiers
massimo.dipierro at gmail.com
Mon Oct 1 19:18:31 CEST 2012
The great thing about open source is that is has brought the world together. I am not an english speaker and I learned the meaning of IF, THEN, FOR, WHILE, not in the context of the English language, but as keywords of the Basic programming language. The fact that they are english words has is accidental. The great thing about code is (used to be) that anybody can read and understand what others write.
When I used program in Italy, I had to deal with latin-1 characters. This was never a problem. Not even in Cobol, Basic, Clipper, or Paradox because data should be separated from code. Data may contain latin-1 or unicode or whatever. Code always contains ASCII and if one does not mix the two there is never a problem.
Allowing unicode in variable names blurs this separation. It makes code written people speaking one language unreadable by people speaking a different language.
I should point out that most of my students are Chinese. They do not have any problem with reading and writing code using the english alphabet.
Any one of us could design better power plugs for our homes. That does not mean it would be a good idea to do so.
On Oct 1, 2012, at 11:43 AM, Robert Kern wrote:
> On 10/1/12 5:07 PM, Mathias Panzenböck wrote:
>> I still don't understand why unicode characters are allowed at all in identifier
>> names. Is the reason for this written down somewhere?
> Robert Kern
> "I have come to believe that the whole world is an enigma, a harmless enigma
> that is made terrible by our own mad attempt to interpret it as though it had
> an underlying truth."
> -- Umberto Eco
> Python-ideas mailing list
> Python-ideas at python.org
More information about the Python-ideas