Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I thought the hivemind was that Lua was bloody awful?

Disclaimer: I have never even read some Lua, honest question



It's not elegant but it's incredibly compact and isolated. I embedded it as a language in an iPhone game (as have many others). Making it bridge with Objective-C was fairly straight-forward and the memory/speed footprint was acceptable for a mobile device.


I find it elegant. It's like Javascript with the warts removed.


It's like JavaScript with different warts. Examples: Bad at Unicode, arrays start at 1, regexps is a second-class citizen, weird OO, arrays are implemented as hash tables (like PHP), hash tables are weird, no int type, Java-like inflexibility wrt extensibility (no generalization for iteration, for example) etc.


Yeah, it's not bad. Though having array indices begin with 1 annoys me.


I've only dabbled a bit in Lua but I mostly read very positive things about it and there are tons of success stories of embedded Lua out there. Way more than any other embedded scripting language. Unlike Ruby or Python etc Lua was designed from the ground up for this.


As others have said, it is small, fast and flexible with a very permissive licence so it is the scripting language of choice for embedded and gaming applications.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: