[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua x XML
- From: Evan Wies <evan@...>
- Date: Fri, 07 Mar 2008 08:10:43 -0500
My colleagues and I recent had a discussion comparing JSON vs XML vs Lua vs YAML (and some others). It was a complex
conversation because we had multiple, disparate needs even within our small organization.
The one part where Lua was at a disadvantage was for web applications. Every modern web browser can handle JSON and XML
natively. So if one were to go to Lua, they'd always be converting Lua->JSON or Lua->XML. [Perhaps this isn't so bad
since most web apps have to convert SQL results from their server-side representation to JSON already.]
In the end, we choose XML for our log output due to the ubiquity of tools and libraries for dealing with it (even with
Lua). But we continue to use Lua extensively for configuration and scripting.
To that end, we also use Ruby for scripting since there is a huge library base compared to Lua. But, we often load our
Lua-based data + scripts into it (the raison d'etre of RubyLuaBridge). For example, we easily replaced ActiveRecord's
YAML configuration file with a Lua file -- the advantage being we can use the same database profiles in Ruby, Lua, and C
(via Lua).
-Evan
Matt Campbell wrote:
> Lua is similar enough to JSON (JavaScript Object Notation) that I think
> the articles and blog posts on XML vs. JSON apply equally well to XML
> vs. Lua, except in one area: Unicode. Whereas JSON requires that the
> UTF-8 encoding be used, Lua leaves this issue up to the application.
>
> Matt
>