Increasing the diversity of people who write Python (was: Benefits of unicode identifiers)

Ben Finney ben+python at benfinney.id.au
Thu Nov 23 22:56:41 EST 2017


Ian Kelly <ian.g.kelly at gmail.com> writes:

> On Thu, Nov 23, 2017 at 1:04 PM, Karsten Hilbert
> <Karsten.Hilbert at gmx.net> wrote:
> > Using function arguments written in Thai script ?
> >
> > Understanding, let alone being able to read, code written in Arabic
> > ?
>
> People are going to write code in Arabic whether you like it or not,
> because not everybody speaks English, and not everybody who does
> *wants* to use it.

This is, I think, a good reason to allow Unicode identifiers (at least,
those Unicode subsets which encode writing systems of languages) as
programming-language identifiers.

> Now, would you prefer to read code where the variable names are
> written in Arabic script, or where the variable names are still in
> Arabic but transliterated to Latin characters?

(On the – evidently correct, in Karsten's case and mine – assumption
that the reader does not understand Arabic script.)

I've thought about this, and if the quesition is which would *I* prefer,
the answer is I'd prefer the identifiers transliterated to the Latin
(English-writing) characters.

Because if I already can't understand the words, it will be more useful
to me to be able to type them reliably at a keyboard, for replication,
search, discussion with others about the code, etc.

Set against that, though, I want the preferences of *others* to be taken
into consideration also. And there are many more people who do not
natively write English/Latin characters, that I want to feel welcome in
the Python community.

So it's a good thing that my own reading preference *does not* have
weight in this matter. I'm not the primary audience for code identifiers
written in Arabic script, so my preference should matter less than those
who understand it.

> Either way, you're not going to be able to understand it, so I'm not
> sure why it makes a difference to you.

I hope you can see that it can simultaneously make a difference – I
would definitely prefer to read Latin-writing identifiers – while also
being a lesser consideration that should not outweigh the benefits of
allowing non-Latin-script identifiers.

> If Arabic characters are allowed however, then it might be of use to
> the people who are going to code in Arabic anyway. And if it isn't,
> then they have the option not to use it either.

This is a necessary consequence of increasing the diversity of people
able to program in Python: people will express ideas originating in
their own language, in Python code.

For that diversity to increase, we English-fluent folk will necessarily
become a smaller proportion of the programming community than we are
today. That might be uncomfortable for us, but it is a necessary
adaptation the community needs to undergo.

-- 
 \         “In any great organization it is far, far safer to be wrong |
  `\          with the majority than to be right alone.” —John Kenneth |
_o__)                                            Galbraith, 1989-07-28 |
Ben Finney




More information about the Python-list mailing list