[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: UTF-8 identifiers [was: Re: Lua t-shirts]
- From: Mauro Iazzi <mauro.iazzi@...>
- Date: Mon, 5 Oct 2009 12:25:39 +0200
2009/10/5 Rob Kendrick <firstname.lastname@example.org>:
> On Mon, 5 Oct 2009 17:30:03 +0800
> Jacques Chester <email@example.com> 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 <firstname.lastname@example.org>:
> 2009/10/5 Mauro Iazzi <email@example.com>:
>> 2009/10/5 Ico <firstname.lastname@example.org>:
>>> * On 2009-10-05 David Given <email@example.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
- Lua t-shirts, Stuart P.Bentley
- Re: Lua t-shirts, Patrick Donnelly
- Re: Lua t-shirts, Phoenix Sol
- Re: Lua t-shirts, Stefan
- Re: Lua t-shirts, Peter Cawley
- Re: Lua t-shirts, steve donovan
- Re: Lua t-shirts, David Given
- UTF-8 identifiers [was: Re: Lua t-shirts], Ico
- Re: UTF-8 identifiers [was: Re: Lua t-shirts], Mauro Iazzi
- Re: UTF-8 identifiers [was: Re: Lua t-shirts], Jerome Vuarand