Killa: a scripting language based in Lua 5.2 with a JavaScript like syntax

Hello,
I just added Killa support for cocos2d-x, to be honest, at least the default sample is working on windows :smiley:
more tests coming soon.

Here is the repo: https://github.com/ex/cocos2d-x

I’m preparing a post with more information but in resume the main differences between Killa and Lua are:

  • Killa (moon in Quechua) is a language based in Lua 5.2 (think in Lua with a JavaScript-like syntax)
  • Killa requires variable declarations (no more silent typo errors)
  • Local variables and local functions are default, global symbols require the “public” keyword.
  • Array tables start with index zero (no 1, so Dijkstra is finally happy)
  • JavaScript like blocks: for, while, do. (missing switch)
  • Ternary operator: (x != null)? doThis() : elseDo()
  • Assignment operators: *=, ~~=, *=, /=, %=
    ~~ Use “this” instead of “self”
  • Use “::” instead of “:” due to JavaScript labels and gotos. This can change in the future, I want to get rid of it and use default methods for objects.
    Also Killa is not JavaScript, because no matter how much flair JavaScript is getting right now, it has very horrendous parts, so I was aiming for the “beautiful parts”
  • Blocks require the braces, they are not optional
  • Killa require variable declaration, the “global” symbol is required to access global objects.
  • Lua variable scope
  • No arrays only Lua tables
  • No switch neither exceptions also the prototype mechanism is missing
  • No*+ — operators (they are not coming, many reasons…)
  • Lua Multiple assignment and return values
  • Lua coroutines
  • Lua powered for fast embedding and small footprint (this rocks) :smiley:

There a lots of things I want to add to Killa (native arrays, classes, vectors, matrices, etc) because Killa is more focused for game development. I need speed and I want small footprint, so if I can speed things I’ll do it, (without resorting to JIT by now).

I hope the cocos2d-x Lua community could give me some ideas and things they would like to see in Killa 0.2 and hopefully find some users interested on using it.

Best regards
Laurens R.