5 awkward and 5 awesome things about lua …
Friday, January 29th, 2010Hey,
I’ve been spending some time checking out lua, because I’m thinking about using it for scripting in games. I’m looking at it instead of tinypy because tinypy is slow and really needs some more TLC to be totally useful to me. However, after looking at lua for a while, I’m finding the things that make it feel awkward to me.
- List indexes starting at 1.
- For loops use [a,b] intervals
- No += operator.
- do / end keywords instead of { }
- List and Dict types combined into one
At the same time, I’ve found that lua is totally awesome. I mean, wow. Really slick stuff! Here’s 5 awesome things:
- Small codebase
- Faster than other dynamic languages
- Easy API integration
- Coroutines <- these are neat!
- State is serializable
So here are my thoughts:
- The first 4 awkward things are superficial, I could probably hack those into shape in a day or two. The 5th item (List + Dict) as one item is probably not something I can fix, but I could probably live with it.
- If I changed the language like that, and provided it for users to create mods for my games I would not be able to give them a link to the lua documentation, since it would not be accurate anymore.
Not quite sure what to do here. Lua seems great, though a few language design decisions seem awkward to me. I could change the language easily enough, but then I would be breaking all the lua documentation for my users.
Anyone got some language-design thoughts on this one?
-Phil