lua-users home
lua-l archive

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


On 15 August 2011 04:59, Sebastien Lai <237482@googlemail.com> wrote:
Lua:
  Contra:
     + lacks classes per se as known from java, c++, delphi, and co
(but are creatable with metatables, but it may be irritating to new
users)

That is, in fact, a selling point to me.  I swallowed the OOP Kool-Aid a long time ago but have since outgrown it and view it as simply another tool on the tool belt.  I don't like having it forced on me any longer, although having it available is nice (which it is in Lua).
 
     + veeeery tiny standardlib, completely lacking proper
file/directory interactions (but there is still lfs)

This is another selling point.  It allows me to embed only the features I need through an opt-in process instead of having to try and pare things away.
 
     + lacking bitwise operators (there's still the bit module)

Personal opinion: if you're doing bitwise operations in a scripting language you are likely doing something wrong.  This isn't always true, hence the library, but I'm not certain that bitwise operators belong in the language proper.  (Actually I am certain.  They don't.)
 
     + stackbased API that might confuse new users who have
previously worked with pythons C API or tcls C API (or similar APIs)

Again, this is a selling point as far as I'm concerned.  Python's C API is a nightmare.
 
     + table interactions can lead to confusing, and long code in the
C API due to stackbased programming

There's this concept called "functional composition".  It helps wrap up the confusing code while keeping the actual client code clean and readable.
 
Squirrel:
  Pro:
     + classes and namespaces are part of the language

To me this is a con.
 
     + easy to learn syntax due to similarity to C++, Java, _javascript_

To me this is a con.  I'm tired of the squiggly brace crowd.  Different semantics should have different syntax.
 
     + constant and static values are part of the language

Again, if you need this kind of stuff in your scripting language you're probably doing something wrong.
 
  Contra:
     + classes can have a constructor, but apparently no destructor

It's a memory-managed language.  There's no destructor in Java either, not, nor C# nor.  (There are finalizers in these, but you're basically screwed if you rely on them.)

--
"Perhaps people don't believe this, but throughout all of the discussions of entering China our focus has really been what's best for the Chinese people. It's not been about our revenue or profit or whatnot."
--Sergey Brin, demonstrating the emptiness of the "don't be evil" mantra.