lua-users home
lua-l archive

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


> .. 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.

> 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.