lua-users home
lua-l archive

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


On 03/05/14 11:59, Coroutines wrote:
> 
> 1) I'd like to see `a` (note the backticks) be a run-once form of
> string.byte('a') -- a single-character transform that happens at
> compile-time.  When you use string.byte() in a loop it'll be run every
> time, and I argue that creating a local for this purpose is difficult
> to name and largely a waste of a local.
> 

You want to make string.byte to be run compile time when literal chars
are seen, yet have you considered bytecode? I ask because the manual
clearly states [1] "Numerical codes are not necessarily portable across
platforms."


[1] http://www.lua.org/manual/5.2/manual.html#pdf-string.byte


-- 
Liam

Attachment: signature.asc
Description: OpenPGP digital signature