lua-users home
lua-l archive

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

> > Another disadvantage of XML versus Lua is that
> > XML scripting is cumbersome and cryptical. 
> > I've seen horrors like this:
> > 
> > <script> 
> > <if> <condition><var="A"/><equals/><var="B"/> </condition>
> > <then><call function="print"><arg><var="A"/></arg></then>
> > <else><call function="print"><arg><var="B"/></arg></else>
> > </if>
> > </script>  
> > 
> > Ok, the syntax of the XML script could be different,
> > but the problem remains the same. I'd rather write 
> > the following:
> > if a == b then print(A); else print(B); end
> You know that the sintax could be : 
> <script> 
> if a == b then print(A); else print(B); end
> </script>

But if the test is:
if a/2 <= b then print("<"); else print(">"); end
it is much more cumbersome to write...
I believe you have to use CDATA or something like that (my XML is rusty and
theoritical only).

XML syntax is still quite hard/tiresome/lengthly to type, at least without
automated help, and not so easy to read for a human.

To think MS chose XML as native format for Office 11... Unless they always
compress it, I expect the files to bloat excessively. Hard disk is cheap these
day, but I still have a 6GB HD on my personal computer, and applications
already eat a lot of it...
</OT> -- See, even mailing list/newsgroups notations are infected :-)


Philippe Lhoste (Paris -- France)
Professional programmer and amateur artist

GMX - Die Kommunikationsplattform im Internet.