lua-users home
lua-l archive

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


2009/10/5 Rob Kendrick <lua-l@nun.org.uk>:
> On Mon, 5 Oct 2009 17:30:03 +0800
> Jacques Chester <jacques@chester.id.au> wrote:
>
>> On 05/10/2009, at 5:19 PM, Ico wrote:
>> > Interesting idea. What's the catch, if there is one ?
>>
>> Unicode contains a lot of characters which are distinct
>> but visually identical or difficult to distinguish. This
>> means, for instance, that you could have two different
>> variables with the "same" name.
>
> You can always shoot yourself in the foot.  Like when somebody chooses
> a font where i and l are indistinguishable :)

In Unicode there are character sequences that are defined to
correspond to the same glyph. Whether you get the correct identifier
or not may depend on your editor saving the "accented character"
sequence or character+accent sequence, for example.

Of course, you can ignore this problem if you use the same editor (and
likely input method) or some other tool to normalize the identifiers.

2009/10/5 Jerome Vuarand <jerome.vuarand@gmail.com>:
> 2009/10/5 Mauro Iazzi <mauro.iazzi@gmail.com>:
>> 2009/10/5 Ico <lua@zevv.nl>:
>>>
>>> * On 2009-10-05 David Given <dg@cowlark.com> wrote  :
>>>
>>>> I'm still pushing for my proposal to allow all characters with codes
>>>> in the range 128-255 to be considered valid in names.  This would
>>>> allow identifiers contain UTF-8 sequences.
>>>
>>> Interesting idea. What's the catch, if there is one ?
>>
>> And conversely, what is the advantage? ;)
>
> Being able to use accented letters or even non-roman characters would
> be a useful tool to teach programming to people not speaking english.
> Ideally you would need to translate keywords, libraries and built-in
> error messages, but given Lua's size that seems reasonnable to do.

I guess this is a widely debated topic, I stay skeptical of any
opinion until there is evidence :)

Anyway the question was more about the merit of including the support
in the language itself with respect to mantaining some PowerPatch. And
also, if this feature were to be included, how many people would patch
it out?

mauro