lua-users home
lua-l archive

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


On Fri, Jan 3, 2014 at 4:57 PM, Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br> wrote:
> .. until perhaps you are using UTF-8? I assume the 40 ?characters? here means Lua bytes, so if you are using UTF-8 the actual number of encoded code points could be significantly less.

Lua identifiers cannot have UTF-8 characters that are not ASCII letters
and digits and underscore.


There's no reason you can't write print(myTable['(╯°□°)╯︵ ┻━┻']), though.
 
> why the compiler doesn't pre-hash string literals in Lua source?

It does in the lexer. See luaX_newstring in the source. It calls
luaS_newlstr which interns short strings.


Would interning longer strings in the source code present any problems?

--
Sent from my Game Boy.