PEP 3131: Supporting Non-ASCII Identifiers

René Fleschenberg rene at korteklippe.de
Tue May 15 07:05:12 EDT 2007


Stefan Behnel schrieb:
> My personal take on this is: search-and-replace is easier if you used well
> chosen identifiers. Which is easier if you used your native language for them,
> which in turn is easier if you can use the proper spellings. 

I strongly disagree with this. My native language is German, and I do
*not* find it easier to find well chosen identifiers using German. Not
at all. Quite the opposite.

Programming is such an English-dominated culture that I even "think" in
English about it. When I want to explain something related to Computers
to German "non-techies", I often have to think about an appropriate
German word for what I have in mind first. Using the familiar English
term would be alot easier.

My experience is: If you know so little "technical" English that you
cannot come up with well chosen English identifiers, you need to learn
it. If you don't, you will not be able to write decent programs anyway.
All the keywords are in English, all of the standard library is in
English, most of the documentation is only available in English, almost
all third party modules' interfaces are in English.

Any program that uses non-English identifiers in Python is bound to
become gibberish, since it *will* be cluttered with English identifiers
all over the place anyway, wether you like it or not.

The point is: Supporting non-ASCII identifiers does *not* allow people
to write programs "using their native natural language". For that, you
would also have to translate the standard library and so on.

meincsv = csv.reader(open("meinedatei.csv"))
for zeile in meincsv:
    for eintrag in zeile:
        print eintrag.upper()

Even in that little trivial code snippet, you need to understand stuff
like "reader", "open", "for", "in", "print" and "upper". Mixing in the
German identifiers is both ugly and unnecessary.

> For example, how many German names for a counter variable could you come up
> with? Or english names for a function that does domain specific stuff and that
> was specified in your native language using natively named concepts? Are you
> sure you always know the correct english translations?

I don't need to know the perfect English translation, just one that is
understood by anyone who knows enough "Programming English", which is
just about any programmer in the world.

-- 
René



More information about the Python-list mailing list