Unicode identifier support in 5.4

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Unicode identifier support in 5.4

Pedro Tammela-2
Unicode identifier support in 5.4 was added recently as a C define
configuration.

Is there any plan to document this new feature in the official reference?

Pedro

Reply | Threaded
Open this post in threaded view
|

Re: Unicode identifier support in 5.4

Roberto Ierusalimschy
> Unicode identifier support in 5.4 was added recently as a C define
> configuration.
>
> Is there any plan to document this new feature in the official reference?

No. Most of these "C define configurations" are not in the official
documentation, as they are not officially supported. (See
LUA_STRFTIMEOPTIONS, LUA_PATH_SEP, lua_lock, LUA_NOCVTN2S, etc.)
They are all "implementation details".

-- Roberto

Reply | Threaded
Open this post in threaded view
|

Re: Unicode identifier support in 5.4

Lorenzo Donati-3
On 23/12/2019 19:47, Roberto Ierusalimschy wrote:

>> Unicode identifier support in 5.4 was added recently as a C define
>> configuration.
>>
>> Is there any plan to document this new feature in the official reference?
>
> No. Most of these "C define configurations" are not in the official
> documentation, as they are not officially supported. (See
> LUA_STRFTIMEOPTIONS, LUA_PATH_SEP, lua_lock, LUA_NOCVTN2S, etc.)
> They are all "implementation details".
>
> -- Roberto
>
>

Please! Don't open that Pandora's box!

I don't think having Unicode identifiers will help any serious
programmer. It will only address some concerns of "localizing" variable
names in languages where basic ASCII is not sufficient to give
"ortographically correct" spellings.

I beat a dead horse here, since I jumped in every discussion in which
this "feature" was requested: I'm completely sure it will "help" writing
unmaintainable code!

My dead-horse example: how many code points Unicode has that resemble a
small circle (or a vertical line) that in some font will look exactly
the same?!?

0 vs. o vs. O
1 vs. l vs. | vs. i

And this is just ASCII. And for ASCII some decent looking font for
programming is available that has nicely distinguishable glyphs for
those (and still typos that mismatch those characters happen).

Moreover, even if you have a Unicode-aware editor (as a programmer
should, probably) you could end up opening one file where the code is
completely obfuscated because you don't have a font covering all the
code points used in the source (AFAIK there is currently no freely
available font that covers every code point in current Unicode standard).

Please! Don't do this!

Cheers!

-- Lorenzo




Reply | Threaded
Open this post in threaded view
|

Re: Unicode identifier support in 5.4

Roberto Ierusalimschy
> I beat a dead horse here, [...]

Lua does not support Unicode identifers and we do not intend to add sush
support. You are really beating a dead horse.

-- Roberto

Reply | Threaded
Open this post in threaded view
|

Re: Unicode identifier support in 5.4

Lorenzo Donati-3
On 27/12/2019 14:18, Roberto Ierusalimschy wrote:
>> I beat a dead horse here, [...]
>
> Lua does not support Unicode identifers and we do not intend to add sush
> support.

Thank you very much for this clear statement! The presence of that
define in the source made me fear it was an experimental facility that
preluded to the introduction of such a feature in a future version!


> You are really beating a dead horse.
>

Yep, fortunately! :-)


> -- Roberto
>
>

Cheers!

-- Lorenzo