lua-users home
lua-l archive

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


On 28 Jun 2012, at 22:22, Julien Duminil wrote:

> What do you think about this proposal?


In regards to proposal 2, why do you need to make any language changes? We use lua for data storage/transmission and we do something similar to:

local data = "{1, 2, 3}"
local f = load(string.format("return %s", data))
return f()

Doesn't that achieve the same as you're trying to do?

For security, we run f in a separate lua_State with no libraries, and then serialize it into the current state, but that's not necessary if you trust your data.

Thanks,
Kev