[Python-Dev] Divorcing str and unicode (no more implicit conversions).
François Pinard
pinard at iro.umontreal.ca
Mon Oct 31 03:25:54 CET 2005
[Martin von Löwis]
> My canonical example is François Pinard, who keeps requesting it,
> saying that local people where surprised they couldn't use accented
> characters in Python. Perhaps that's because he actually is Quebecian
> :-)
I presume I should comment a bit on this.
People here are not "surprised" they couldn't use accented characters,
they are rather saddened, and some hoped that Python would offer that
possibility, one of these days. Also given that here, every production
program or system has been progressively rewritten in Python, slowly at
first, and more aggressively while the confidence was building up, to
the point not much of the non-Python things remain by now. So, all our
hopes are concentrated into a single language.
All development is done in house by French people. All documentation,
external or internal, comments, identifier and function names,
everything is in French. Some of the developers here have had a long
programming life, while they only barely read English. It is surely
a constant frustration, for some of us, having to mangle identifiers by
ravelling out their necessary diacritics. It does not look good, it
does not smell good, and in many cases, mangling identifiers
significantly decreases program legibility.
Now, I keep reading strange arguments from people opposing that we use
national letters in identifiers, disturbed by the fact they would have
a hard time reading our code or publishing it. Even worse, some want to
protect us (and the world) against ourselves, using made up, irrational
arguments, producing false logic out of their own emotions and feelings.
They would like us to think, write, and publish in English. Is it some
anachronical colonialism? Quite possible. It surely has some success,
as you may find some French people that will only swear in English! :-)
For one, in my programming life, I surely chose to write a lot of
English code, and I still think English is a good vehicle to planetary
communication. However, I like it to my choice. I always felt much
opened and collaborative with similarly minded people, and for them,
happily rewrote my things from French to English in view of sharing,
whenever I saw some mutual advantage to it.
I resent when people want to force me into English when I have no real
reason to do so. Let me choose to use my own language, as nicely as
I can, when working in-shop with people sharing this language with me,
for programs that will likely never be published outside anyway.
Internationalisation is already granted in our overall view of today's
programming, as a way for letting people be comfortable with computers,
each in his/her own language. This comfort should extend widely to
naming main programming objects (functions, classes, variables, modules)
as legibly as possible. Here, I mean legible in an ideal way for the
team or the local community, and not necessarily legible to the whole
planet. It does not always have to be planetary, you know.
For keywords, the need is less stringent, as syntactical constructs are
part of a language. When English is opaque to a programmer, he/she can
easily learn that small set of words making the syntax, understanding
their effect, even while not necessarily understanding the real English
meaning of those keywords. This is not a real obstacle in practice.
It is true that many Python tools are not prepared to handle
internationalised identifiers, and it is very unlikely that these tools
will get ready before Python opens itself to internationalised
identifiers. Let's open Python first, tools will undoubtedly follow.
There will be some adaptation period, but after some while, everything
will fall in place, things will become smooth again and just natural to
everybody, to the point many of us might remember the current times, and
wonder what was all that fuss about. :-)
--
François Pinard http://pinard.progiciels-bpi.ca
More information about the Python-Dev
mailing list