lua-users home
lua-l archive

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


>>> jjensen@workspacewhiz.com 09/20/02 08:29 AM
> I could do this, but I've always promoted Lua as a better alternative to
> XML.  Freeform your data.  Change it at will.  Make sweeping
> updates/rearrangements with a few lines of script.  Consistent API per
> platform, as opposed to having to find an XML library per platform.

> That said, I certainly wouldn't want to tell other Lua users: "Lua will
> let you freeform your data, but don't do that if you're going to access
> the data from C (usually one time).  Otherwise, you'll have to train
> your developers on the complexities of Lua stack management and just
> what functions require usage of the stack."

> ...SNIP...

I think there's a misunderstanding here. I believe the suggestion to use a table was simply suggesting you modify the processing of the data description in Lua to store information in a table, rather than putting large amounts of information on the stack. Thus it was simply a suggested alternative implementation that would eliminate some or all of the stack overhead.

I have to admit that *my* first reaction to the idea of 1000+ items on the stack was "Yikes!". And my first impulse is to suggest ways to keep that from happening. Since I haven't seen your language, I don't know if there are any reasonable alteratives. I'd be glad to look at your data description language, it would be interesting to see how you put it together, and I might have some useful suggestions. (Also I might be able to use it as an example in my Programming Languages course). Lawyers permitting of course.

  - Tom Wrensch