I would like to add scripting support to an applications and with plenty scripting languages available I am a bit overwhelmed.
At first I thought about Python but I guess Python is a little too big for my taste and the application (although I like it very much, it gets a lot of things right in my opinion while the syntax is clean and simple especially if you are not doing heavy OOP).
I am also very fond of Lisps. I like scheme and it is the perfect extension language - at least in some ways, but I would like to stay syntactically more conservative.
I remember having heard a lot of positive things about Lua and indeed Lua seems a good possibility. Unfortunately there is this one thing that really "turns me off": Its the local
keyword for local binding. This is really ugly to my taste and I frankly do not quite grok why languages are still designed this way and in essence knowing about local
. This is also a major drawback of JavaScript in my opinion and I feel like it all boils down to bad language design. My major concern is, that a user might just override a function from just within her/his function just by omitting local
.
But then Lua gets a lot of things right, size, speed, and it is surprisingly scheme-esque. Yet I am really afraid that it is not suitable for non-programmers who have no sense of scope.
- Any alternatives on the horizon?
Might hacking the Luacore to make local the default be an option?
Lua sources appear to be quite decent and modular, so this would be an interesting project ;)