[Date Prev][Date Next][Thread Prev][Thread Next]
- From: Vinicius Jarina <viniciusjarina@...>
- Date: Thu, 3 May 2012 13:14:04 -0300
It's not clear for me.
Killa will be a super-set of Lua?
Any lua program will be compatible with Killa (just like C and C++) ?
On Tue, May 1, 2012 at 10:32 PM, [ex] <email@example.com>
I decided to change the syntax of Lua and integrate it with Love (a
game engine) for a personal project of mine.
Right now the virtual machine has not changed but I suspect that
changing it is very likely in the future.
So by now most of the changes were done in the lexer and parser.
My repository can be found here: https://bitbucket.org/ex/love
This time only windows supports due to my laziness (sorry). But
support for other platforms is in the way.
If you are interested in playing with the language there is a compiled
interpreter and some scripts for test in the directory.
Also the game engine loads a simple tetris clone I did to test everything.
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
- 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)
- Ternary operator: (x != null)? doThis() : elseDo()
- Assignment operators: +=, -=, *=, /=, %=
- Use "this" instead of "self"
change in the future, I want to get rid of it and use default methods
was aiming for the "beautiful parts" (T)
- Blocks require the braces, they are not optional (you'll have to
type two extra characters now, the madness)
- Killa require variable declaration, the "global" symbol is required
to access global objects.
everything at the beginning and must declare before use)
- No arrays (by now) only Lua tables
- No switch neither exceptions (by now) also prototype mechanism.is
missing (and I don't think I'll add it later)
- No ++ -- operators (they are not coming, many reasons, most
important I'm not that smart to decipher quickly the one liners I have
seen in real life)
- Lua Multiple assignment and return values
- Lua coroutines
- Lua powered for fast embedding and small footprint (this rocks) :D
There a lots of things I want to add to Killa (native arrays, classes,
vectors, matrices, etc) because Killa is more focused for game
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 game 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.