Benefits of unicode identifiers (was: Allow additional separator in identifiers)

Rustom Mody rustompmody at gmail.com
Mon Nov 27 08:18:46 EST 2017


On Monday, November 27, 2017 at 3:43:20 PM UTC+5:30, Antoon Pardon wrote:
> Op 23-11-17 om 19:42 schreef Mikhail V:
> > Chris A wrote:
> >
> >>> On Fri, Nov 24, 2017 at 1:10 AM, Mikhail V wrote:
> >>>
> >>>> Chris A wrote:
> >>>>
> >>>> Fortunately for the world, you're not the one who decided which
> >>>> characters were permitted in Python identifiers. The ability to use
> >>>> non-English words for function/variable names is of huge value; the
> >>>> ability to use a hyphen is of some value, but not nearly as much.
> >>> Fortunately for the world we have Chris A. Who knows what is
> >>> fortunate and of huge values.
> >>> So is there any real world projects example of usage of non-latin scripts
> >>> in identifiers? Or is it still only a plan for the new world?
> >
> >> Yes, I've used them personally. And I know other people who have.
> >
> > Oh, I though it would be more impressive showcase for 'huge value'.
> > If we drop the benefit of the bare fact that you can do it, or you just
> > don't know English, how would describe the practical benefit?
> > If you don't know english, then programming at all will be just too hard.
> > (or one must define a new whole language specially for some local script)
> 
> Well maybe the value is not huge, but I really appreciate the possibility.
> Being able to write something like below, makes things a lot more clear
> for me.
> 
> Po = Pc + R * Vec(cos(θo), sin(θo))
> Pe = Pc + R * Vec(cos(θe), sin(θe))
> 𝚫θ = θe - θo
> 𝚫P = Pe - Po

Yeah… This is important
And Ive tried to elaborate such suggestions here
http://blog.languager.org/2014/04/unicoded-python.html
[includes some of your suggestions!]
I should emphasize that the details there range between straightforward and
facetious.  The general sense of going beyond ASCII is not facetious at all
In fact its ridiculous in the reverse direction: just as FORTRAN and COBOL
believed that programming IN ALL UPPERCASE was somehow kosher, likewise
a 2017 language believing that sticking to ASCII is sound is faintly ridiculous.

But that brings me to the opposite point:
I feel its important to distinguish ‘parochial/sectarian unicode’ from 
‘universal unicode’.
More on the distinction http://blog.languager.org/2015/03/whimsical-unicode.html
More on the universal aspect: http://blog.languager.org/2015/02/universal-unicode.html

Having said that I should be honest to mention that I saw your post first on
my phone where the θ showed but the 𝚫 showed as a rectangle something like ⌧

I suspect that Δ OTOH would have worked… dunno

So yes, there can be non-trivial logistic problems going beyond ASCII
As there are problems with errant mail-clients transmitting indentation-sensitive languages and so on!



More information about the Python-list mailing list