Re: serializing lua tables
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: serializing lua tables
- From: Adrian Sietsma <adrian_groups@...>
- Date: 2005年3月22日 02:59:43 +1100
Framework Studios: Hugo wrote:
(why serialise via xml if you can do it in lua)
...because Xml is a standard.
Why make up yet another 'do it in lua' format when you have Xml?
because i can just loadfile/dofile the config from lua. it's not another
format, simply lua.
I was not saying there's no use for xml, just that i use lua as a simple
configuration language for my app(s), and it works just fine;
but - i have no simple way for the app to modify that config & rewrite
it, preserving the original format.
i have lua read-write configs, but i'd like to keep the config format
and comments.
in this case, interoperability (is that a word?) is not required, and a
small lua text file/table is easier to read / document / edit than xml.
also, as Klaus Ripke comments, what is xml ?
if you support all the dtd/entities/embedded docs/encodings defined in
xml, the parser is non-trivial, especially for a small app. if your xml
parser supports only a subset of those, what standard is it ?
i have used xml for data interchange, but it's too wordy for my simple
10-variable config file.
i'm not trying to start a "which is best" discussion (pc/mac,
windows/*nix, emacs/vi - we could be debating that for years).
Adrian