[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: string immutability
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Fri, 3 Jan 2014 19:57:02 -0200
> .. 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.