[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: UTF-8 identifiers [was: Re: Lua t-shirts]
- From: David Given <dg@...>
- Date: Mon, 05 Oct 2009 11:05:54 +0100
Jerome Vuarand wrote:
Lua lexer uses isalpha C function, therefore depending on the locale
some of the characters in 128-255 are already valid.
It shouldn't be! It should be using the C locale for all code-related
parsing --- languages should never, ever, under *any* circumstances,
change their behaviour depending on locale!
That way lies madness, with a perfectly valid program on one computer
failing to run on another simply due to some user configuration setting.
I've been burnt by this before. It's decidedly not fun.
You could change
it to allow all characters in 128-255 in addition to 'alpha' class and
underscore, but that would be a hack imho.
Of course! But it's a *useful* hack. We lose nothing by it, but gain
functionality in other areas --- there are other ASCII-compatible
encodings that this would work with, for example.
┌─── ｄｇ＠ｃｏｗｌａｒｋ．ｃｏｍ ───── http://www.cowlark.com ─────
│ "They laughed at Newton. They laughed at Einstein. Of course, they
│ also laughed at Bozo the Clown." --- Carl Sagan
- Lua t-shirts, Stuart P.Bentley
- Re: Lua t-shirts, Pierre LeMoine
- Re: Lua t-shirts, Roberto Ierusalimschy
- 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], Jerome Vuarand