[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua as save file - how to generate lua file
- From: "Andy Stark" <astark@...>
- Date: Mon, 06 Mar 2006 13:53:10 GMT
Lua list <lua@bazar2.conectiva.com.br> writes:
> prepending "return " to the file (and
>separating the constructors with commas) ensures that it cannot execute
>malicious code
There is another issue in addition to safety against malicious code. Lua
table constructors would be more attractive as a data format if you didn't
have to embed a complete Lua interpreter to use the format. A highly
simplified, but Lua-compatible format would not require the whole
interpreter. It would also be fairly easy to write a parser for this
format in languages other than C (eg, C#, RealBasic) whereas it would not
really be practical for most people to re-implement the whole interpreter
just to use the data format.
The Lua table format is so simple and powerful that it would be useful in
its own right whatever language you were using. Also, making it available
might increase the adoption of Lua. If you were using the data format for
its own sake then it would also be useful to learn Lua as it is obviously
the "natural" language to process the format.
&.
#####################################################################################
This e-mail message has been scanned for Viruses and Content and cleared
by NetIQ MailMarshal.
The Blackpool Sixth Form College.
#####################################################################################