lua-users home
lua-l archive

RE : Proposal: Lua Table Notation + load change

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


> 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?
Definitely yes, it would be just a syntactic sugar for chunk:
 chunk ::= block | tableconstructor
(and to continue a recent thread, maybe it could help some people to understand the difference between a chunk and a block ^^)

AltStyle によって変換されたページ (->オリジナル) /