lua-users home
lua-l archive

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

Talking about sharing, right now the only true way of sharing Lua programs
is in source code since compiled Lua scripts are not endian-aware.

Having locale-dependent or user-defined-charset identifiers means problems
to share scripts in source code too.

IMHO, the only way out of the basic ASCII charset for identifiers is
Unicode, but for that to work one has to know in which encoding his editor
saves the files, and the Lua interpreter/compiler has to be configured to
run/compile scripts in that same encoding by converting the identifiers to
Unicode first.

Maybe that's the reason why there aren't Java programs using non-ASCII
characters in their identifiers :-)



--------- Mensagem Original --------
De: Lua list <>
Para: Lua list <>
Assunto: Re: UTF-8 identifiers [was: Re: Lua t-shirts]
Data: 05/10/09 10:04

> Yes, I am familiar with the problems of chinese transliteration, 
> although I don't speak chinese. Japanese is my thing ^^
> I guess you could call it the least-common-denominator or something. Not 
> that I want to force them into something that for them is very 
> inconvenient. With 1330 million cizitens, I guess programming with hanji 
> names wouldn't be too bad, but I am still worried about
> and &quot;shareability&quot;.
> As I said, keep it as simple as possible. If UTF-8 becomes valid for 
> names, how are those who don't speak chinese going to use the code? How 
> about rules for what is valid and what is not? Will there be a auxiliary 
> program that can easily convert from hanji to latin characters? What 
> about readability?
> Even though I'm Finnish (with Swedish mothertongue, but also fluent in 
> Finnish) I have *never* used neither Finnish nor Swedish identifiers. 
> Even back in primary school when I first started with my 386 and qbasic, 
> it was always English. In my oppinion, the first and foremost important 
> aspect of programming is sharing.
> Sure, if it's closed source I couldn't care less.
> However, if you allow UTF-8 you need to be prepared to deal with all the 
> problems it is going to present. If you do so, then great, it might not 
> be a total failure after all. HOWEVER, if you go into this half-arsedly, 
> without proper understanding of the scale of such a project, it is only 
> going to cause more trouble than solve anything.
> Kenneth
> David Given wrote:
> &gt; Kenneth Forsbäck wrote:
> &gt;&gt; If these would-be programmers are so young they have problems
> &gt;&gt; Latin/ASCII, then they shouldn't be learning Lua, or any other 
> &gt;&gt; programming language for that matter.
> &gt; 
> &gt; You're assuming that they speak a language with an easily latinised 
> &gt; form. That's not necessarily the case. You look like you're Finnish
> &gt; Finnish uses accented characters, but you can easily force it into
> &gt; and produce comprehensible approximations of Finnish words that you
> &gt; use in identifiers.
> &gt; 
> &gt; But the same doesn't apply to Chinese, for example. Chinese 
> &gt; latinisations are notoriously horrible; there are several conflicting

> &gt; versions (did you know that Beijing and Peking are *the same word*?).
> &gt; 
> &gt; And besides, why should they have to? Why shouldn't they use their 
> &gt; native language to write their code in? Why force them to use an
> &gt; alphabet just so that they can use Lua? Why make them do things *our*

> &gt; way, when such a tiny change would let them do things *their* way, in

> &gt; the way they find most comfortable?
> &gt; 

Mensagem enviada pelo Microlink Webmail 12.7.8p3