lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Ср 22.02.17 4:12, Dibyendu Majumdar wrote:
Related to my post about why I have not used the JIT technology in
Ravi for my project (yet), is the question: do we need a JIT for Lua
at all?

I have no data points to tell me under what conditions a JIT makes
sense, apart from artificial benchmarks. The most obvious use case is
games programming I guess where the highest performance is needed, but
I am not a games programmer and do not know whether interpreted Lua is
good enough in this case.

In my opinion, having worked on Ravi and in my usage of it, Lua is not
a general purpose language that you would use to build a large scale
application. This is not because of any deficiency in Lua, it is more
that large scale development is better done in statically typed
languages like Java, C#, Go, Swift etc. The cost of developing complex
applications in a dynamic language is just too high. I know that many
folks on this list will probably disagree with this view, but leaving
aside your love for Lua and your wish to use Lua everywhere, would you
still use Lua as a general purpose application development platform?

Yes, I'm planning to write games in Lua and no, I don't agree dynamic typing is a big deal like that. I've made a serious level editor for Might and Magic 6-8 games (hackerish stuff :) ) in Lua and I can say everything came together much smoother than in any of my projects in Delphi. LuaJIT was very important for it. So, depending on the kind of moddability a game needs I would choose from Lua and C#, but I would certainly never want to write any game logic in C/C++.

I've made a script to statically catch unwanted global variables access, still haven't posted it to the list BTW. Lack of static typing is regrettable, but in practice it wasn't a problem because of this script. Misnamed fields are still a possibility, maybe I had 1 or 2.

In my father's experience, lack of static typing isn't a big problem in a real complex web application developed by a small team over the course of a few years in JavaScript.

And don't forget about compilation times, which can be a real pain in big applications sometimes.


Best regards,
Sergey "GrayFace" Rozhenko,                 mailto:sergroj@mail.ru