[Python-3000] Support for PEP 3131

Talin talin at acm.org
Sun May 13 07:36:10 CEST 2007


Guillaume Proux wrote:
> Dear all,
> 
> Pleased to meet you. I just subscribed to the list because I wanted to
> join the discussion regarding a specific PEP (for all the rest, you
> are all much more expert than me)
> 
> Guido:
>> 3131 (non-ASCII identifiers) -- I'm leaning towards rejecting.
> 
> I would like to voice my opposition to the rejection at that stage and
> request that more time is spent requesting/analysing the opinion of
> more people especially the people who have to deal with non-roman
> languages as a daily basis and especially people in the education
> field (along like other interesting people like the OLPC people)

One point that was raised by Alex Martelli is that the full set of 
Unicode 'letter' characters includes many characters which are visually 
indistinguishable in every font in the world. It means that, from now 
on, when I look at the variable named 'a', I can no longer be sure that 
what I am looking at is really the character I think it is. It means 
that we have introduced, for every Python programmer, a level of 
uncertainty that wasn't there before.

Programming languages are supposed to represent a compromise between the 
capabilities of humans and the capabilities of computers - in other 
words, both humans and computers are supposed to meet each other 
half-way and find a "sweet spot" that represents a restricted set of 
commands and symbols that both can understand. Each of them is expected 
to put a certain amount of effort into learning this common language - 
in the case of the computer, that effort is embodied into the design of 
the compiler, and in the case of the human, that effort is the learning 
of a formal dialect of commands and codes.

However, there is another use of programming languages, which is for 
programmers to communicate with each other. Specifically, the 
programming language provides a concise, unambiguous way to describe a 
particular algorithm or technique. Again, there is the expectation that 
practitioners of this discipline are expected to put a certain amount of 
effort into learning this formal language so that they can communicate 
with each other precisely.

The fact that programming languages resemble a particular human language 
is a pedagogical convenience, but it need not be so, and wasn't always 
that way. And the fact that a pidgin form of English words and grammar 
is used for most programming languages is a frozen accident, just as 
English is also the language used for international air traffic control. 
However, I think it is a mistake to think that programs themselves are 
written in "English", they are written in a formal language, similar to 
the language of mathematics, which every programmer needs to put in a 
modest amount of effort to learn, even native English speakers.

In any case, I would argue that if you teach someone to program in a 
dialect that cannot be understood by the global community of 
programmers, then you haven't really taught them 'programming' at all - 
you've taught them a kind of applied logic that they might be able to 
use personally, but that is only a small part of the craft of software 
engineering. The greater part is the ability to understand the vast 
corpus of literature out there that explains how to do just about 
everything you can think of with these tools. Only through learning a 
common language can they participate in the global technical 
infrastructure, which is more and more what I believe 'programming' is 
about.

There is another issue to be considered as well: Many human languages 
have a different grammatical structure. Even if you were to allow 
non-ASCII identifiers, and more so even if you were to allow the 
keywords themselves to be localized, you still have the problem that 
'if' comes at the start of a sentence, which makes no sense in many 
languages.

-- Talin


More information about the Python-3000 mailing list