Q&A

Why Hurdy?

I really like the way Lua is designed and works, but:

  • I find its block delimiters to be verbose and they make (for me) the code harder to parse

  • The fact that variables are global by default has been a source of many, many bugs in my code

I designed Hurdy to address these points while retaining the simplicity of the language. While I was at it I also added some extra features that I though would be useful to have.

Should I use the C++ or pure Lua library?

It depends on your needs. They both have pros and cons—and they’re opposite of each other!

C++ library

  • Pros: it’s faster

  • Cons: has to be compiled for each system, which makes it more difficult to install, as well as distributing applications that use the library

Pure Lua library

  • Pros: does not need to be compiled and can be installed/distributed by simply moving Lua files around.

  • Cons: it’s slower (but it’s not that bad if using LuaJIT).

An important point to keep in mind is that a finished application will likely not need to ship with the library, as all the files can simply be compiled to Lua; this means that the pros/cons related to distributing the application may not apply at all. Moreover, it’s likely that the library will only used in order to load scripts using Lua’s require mechanism, in which case all the compilation is only done once per file (and probably all at the start of the program) so the speed factor is not a huge issue (especially if the library is only used for development).