[Python-3000] Support for PEP 3131

"Martin v. Löwis" martin at v.loewis.de
Sun May 13 20:27:34 CEST 2007


> Have there been studies on this kind of thing? Has there been any
> research into whether a mixture of English keywords and, say, Japanese
> and English identifiers makes a given programming language easier to
> learn and use? If so, why aren't they referenced in the PEP or linked
> in any emails?

There is anecdotal evidence that people intuitively use characters
from their native language, and then are surprised by the syntax errors.

<sarcasm>
Unfortunately, they are not required to report their usage to the
Ministry for Use Of Funny Characters In Programming Languages.
</sarcasm>

> Given the lack of evidence presented so far, my
> operating assumption is that the PEP's supporters -- including you --
> are making things up to support a conclusion that they might wish to
> be true.

Are you also assuming that I make up my mentioning of anecdotal
evidence?

> Also, method/function names are traditionally expressed in English as
> verb phrases (e.g., "isElementVisible()") which dovetail nicely with
> Anglo-centric keywords like "if" and "for ... in ...". How do
> identifiers in languages with dramatically different grammars like
> Japanese -- or worse, different reading orders like Farsi and Hebrew
> -- interact with "if", "while" and the new "x if y else z" expression,
> which are deeply rooted in English grammar? My suspicion is, at least
> for right-to-left languages like Arabic, not well, if at all.

I don't speak Farsi, Arabic, or Hebrew, so I can't comment on that.
I know that in German, if/while is not an issue at all. People
regularly read "if" aloud as "wenn" or "falls".

> Lastly, I take issue with one of the PEP's guidelines under the
> "Policy Specification" section: "All identifiers in the Python
> standard library...SHOULD use English words wherever feasible"
> (emphasis in the original). Are we now going to admit the possibility
> that part of the standard library will be written in English, some
> parts will be written in Spanish and this one module over there will
> be written in Czech? Absolutely ludicrous.

The emphasis follows the convention of RFC 2119; it's not an emphasis,
but an indication of specification.

3. SHOULD   This word, or the adjective "RECOMMENDED", mean that there
   may exist valid reasons in particular circumstances to ignore a
   particular item, but the full implications must be understood and
   carefully weighed before choosing a different course.

There are already deviations from that rule in the standard library:

(aifc.AIFC_read.)initfp
(aifc.AIFC_read.)getnchannels
(aifc.AIFC_read.)getcomptype
(asyncore.dispatcher.)del_channel
(binhex.)_Hqxcoderengine
opcode.def_op
opcode.name_op
opcode.jrel_op
(etc.)

all are not proper English words.

Regards,
Martin



More information about the Python-3000 mailing list