lua-users home
lua-l archive

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


Stefan,

On Fri, Sep 3, 2010 at 13:24, Stefan Behnel <stefan_ml@behnel.de> wrote:

> Alexander Gladysh, 25.07.2010 07:11:

>> But Lua discrimination strikes again:

>>     <...>Lua code is harder to write than Python code as the language
>> lacks most of the batteries that Python includes. Writing large
>> programs in Lua is rather futile<...>

> Sorry for the "discrimination", I see now that it can easily be read that
> way. I changed that paragraph to the following, hoping that it makes it
> clearer what I actually meant to say.

> """
> However, Lua code is harder to write than Python code as language and
> runtime lack many of the batteries that Python includes. Lua is not commonly
> used as primary language for large applications, but it provides a perfect
> backup language when raw speed is required and the edit-compile-run cycles
> of binary extension modules are too heavy and too static for agile
> development.
> """

This is not the "absolute truth". You should at least add "in my
opinion" to this paragraph.

1. "Lua code is harder to write than Python code as language". This is
really a matter of personal preference. I, personally, believe that
Python is harder — its syntax is not designed half as well as Lua's.
But that is my opinion, nothing more.

2. "...Runtime lack many of the batteries that Python includes". I'm
not sure that it is a "runtime" to blame. I understand "runtime" here
as "what is packaged with the core of the language". I see it as a the
correct way to distribute the language — core separately from the
libraries (but, again, that is my personal opinion, not absolute
truth). On to the other hand, if you'd said something along the lines
that "Lua ecosystem is heavily underdeveloped when compared to
Pythons", this would be the truth.

3. "...Lua is not commonly used as primary language for large
applications". Now I'm not sure what to say here. I, personally, use
it in this way. Most of my recent professional projects were written
primarily in Lua. (That is, there was more Lua code than C or C++
code.) And we're talking about projects of 100-300 KLOC of Lua and
C++. This is the way, as I understand, that Programming in Lua books
adverstise — when coding, do it in Lua. If you don't fit in speed /
memory constraints, rewrite to the host language. On to the other
hand, when compared to Python, in general (not mine) practice, Lua is
definitely less used as a primary language and more as a secondary
scripting language.

4. "[Lua] provides a perfect backup language when raw speed is
required and the edit-compile-run cycles of binary extension modules
are too heavy and too static for agile development." Now that is,
probably, the truth (however this is not the everything that Lua is,
far from it). So, if you'd add something along the lines that "When
your primary language is Python..." to that statement, this will,
probably, be correct.

With respect,
Alexander.

P.S. I apologize if I may sound harsh or impolite somewhere in my
letter, this is not intended. I also not trying to put words in your
mouth, merely trying to understand what I (personally) feel wrong with
your post and how to make it look more objective.