[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [OT] Re: Allow UTF8 value names in lua?
- From: Lorenzo Donati <lorenzodonatibz@...>
- Date: Wed, 30 Oct 2019 13:53:52 +0100
On 30/10/2019 13:28, bil til wrote:
To avoid misunderstandings:
With this topic I would NOT intend to create "libraries" in UTF8 format, or
any "basic lua code".
I would like to allow this just for the "final end user at the front". If I
e. g. sell some software to China, which has some configuration interface
supporting scripting, I am very sure that Chinese customers would LOVE to
have the possibility to use Chinese variable names in their "final lua" code
(NOT to be meant to be used as library).
Well, if you mean to allow non-programmer kind of persons to do some
configuration scripting inside a host application, that may change the
Anyhow, consider the fact that using raw Lua files for configuration and
scripting is not inherently safe, you have to heavily sandbox user
programs to avoid malicious/bad code to wreak havoc in your application.
Just for example, how do you handle a loop that never ends in an user
script? It may lock down the entire application if the user code is not
carefully isolated. This is one of your biggest challenges, before you
think about Chinese var names.
So, if your intended audience are non-programmers (modders of a game?
users of a word processor?), probably you would be better off creating a
really dumbed-down language, which supports Chinese variable names as
part of the course, without either modifying core Lua or exposing the
Lua language to end users.
If, on the other side, your end users are Chinese programmers (maybe
your application is a tool for programmers or technical people), who are
supposed to know what they are doing and whose code is assumed to be
trusted, probably they would appreciate the fact of NOT being able to
use characters outside ASCII in their code.
I do not think that this really would create problems with libraries ... I
am quite sure that anybody who wants to program library functions to be used
by larger community of course would NOT use UTF8 in the code, but would use
all variables in ASCII coding... .
Sent from: http://lua.2524044.n2.nabble.com/Lua-l-f2524044.html