lua-users home
lua-l archive

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

On Thu, Feb 3, 2011 at 12:36 PM, Steve Litt <> wrote:
> Aren't YAML and JSON more readable than Lua code? If so, that's very important
> if the user needs to edit a config file or native format.

Readability will depend more on pretty printing than format. Lua data,
JSON, YAML and LPC object code (MUD language) aren't terribly
different to casual inspection. If someone is hand editing values in
any of these, they'll probably just be searching for a key or value
and modifying the value. Pretty printing will help users with grep or
various search and replace operations and the syntax will remain
irrelevant unless they get too zealous with the delete key.

On Thu, Feb 3, 2011 at 1:00 PM, Steve Litt <> wrote:
> I would think that another price would be you'd have to include a parser for
> the non-executable serialization format, and then you'd need to write
> application code to incorporate its data. With Lua as a serialization format,
> you need no parser and at least part of your application code is written
> already. So it would be easier and faster to develop, and the app's footprint
> would be smaller, I would think.

The word "performance" is so nebulous that I didn't bother
differentiating between CPU and memory utilization.

The difference between [[mystate = dofile("objectfile")]] and
[[mystate = decode("objectfile")]] for any arbitrary serialization
format is highly variable depending on the parsing algorithm of the
decode function... and subject to more discussion for less cause here
than it is in communities for languages like Python that have a higher
interpreter overhead. If there's a high load, the environment presents
significant constraints or the parser is particularly inefficient then
there may be a noticeable difference in user space, otherwise it's
self-gratification for the coder. Nothing wrong with that in my
opinion, but IANAP*. ;)

51st century guy

* I am not a priest.