lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


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