|
Top post on a top post, apologies. A gentleman from work recently 'invented' an embeddable javascipt interpreter called _javascript_ Interpreter Shell (Jsi for short. http:// www.jsish.org. I was going to post about it at some point for interest in interpreter comparisons). JSON as a data structure is very cool, but I've found that having to handle arrays separately from objects is a huge pain compared to Lua tables. Trivial patterns are sometimes easier, but when sequence/object structure navigation get even slightly more complex, Lua tables win out every time for ease of use and flexibility (IMHO). The similarities between Jsi and Lua are striking, making the comparison of data structures much easier in my mind. I also used to think an array would be nice in Lua but have re-considered that opinion after working with Jsi for a few months. Russ Sent from my BlackBerry 10 smartphone on the Virgin Mobile network.
Top posting to nobody in particular. I was arguing something about lengths or arrays at some point. Some helpful Lua List member kindly pointed something out to me: Lua does not have sequences. It only has tables. To put a positive spin on it: Lua has tables as it’s only data structure, at least as of 5.4, which will eliminate the limited ... (perhaps helped along by threads like this). There is nothing that can’t be represented as a table and if you want something fancy, you have userdata. Adding sequences solves no problems. “One data structure” is one of Lucas most important traits. I recommend learning to enjoy it and to play with that beautiful limitation. -Andrew On Sun, Jan 21, 2018 at 06:15 Petri Häkkinen <petrih3@gmail.com> wrote:
|