lua-users home
lua-l archive

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


Lua is very much suited for exploratory programming, live coding, scripting, customizing, tweaking, even creating makefile system (premake for example) at very fast pace without recompile, relink cycles. My plan someday is to be able to use it from Autodesk products to write certain plugins, without the need to recompile, and ability to tweak and fix the things on the fly. Also any technical artist would prefer Lua much more than C++.

Now take that, and in only 300kb executable code you have LuaJIT that can bring the performance very close to "C" for a lot of things.

I've seen only few other languages, systems close to that. One is Common Lisp (and specific implementations), but no Common Lisp system comes small, and all of them are statically compiled in dynamic environment - unlike LuaJIT with trace compilation. For that reason the get fast code in CL you have to specify where needed the types, and these serve as promises to the compiler, which he would obey and make your code fast (SBCL, LispWorks, Allegro, ClozureCL and others are doing pretty good job at it).

On 6/23/2011 2:07 PM, Francesco Abbate wrote:
Lorenzo, Henning, all,

thank you very much for the interesting discussion about Java and
Erlang, you are certainly more knowledgeable than me about these
programming languages and I think that I'm going to learn more about
Erlang.

Ultimately it seems that the idea that I had of Java is basically
correct even if I was not aware of a lot of details. I have no
experience of Java programming, my only knowledge came from my work
where we have a lot of Java applications. Sometimes they throw stupid
exceptions and became unusable and they are so terribly slow and
memory hungry so I just hate them.

For the other side my feeling is also that Lua really *lacks* the
possibility of Java to detect errors before execution using a typing
system or something similar. The fact that you have no types at all
and no warnings of any kind even for a small typing error is terrible
when you develop something even moderately complex. In addition you
don't even have a debugger so it is even more painful. And yes I know
that some home-made 'strict' packages and debugger exists but they are
often incomplete and of little aid.

When I work in C or C++ I'm glad that many trivial and not-so-trivial
errors can be detected during compilation and, what a relief, I can
throw the debugger and inspect all the variables step-by-step when I
really don't understand.

This is even more OT but it is strictly related to the Java
discussion. Where Java is very strong Lua is terribly lacking :-) and
please, no flames, I don't want to be polemic, I express just some
reflections about a programming language, Lua, that I ultimately like
and use (beside C, C++ and python).

Francesco