[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Squirrel?
- From: Sebastien Lai <237482@...>
- Date: Mon, 15 Aug 2011 03:59:02 +0200
So what about the Squirrel Programming language, which is largely based on Lua?
Who of you guys uses it (even in production, maybe?)
I've tried to assemble a pro/contra list here, mostly just naming
things from my own experience with both Lua and Squirrel:
Lua:
Pro:
+ very small memory footprint, if not the smallest right next to forth
+ very easy to learn due to obvious syntax "borrowed" from
algol, fortran and basic
+ stable, easy to use module system
+ very easy to embed, and thus to extend
+ big community, thus easy to get help
+ luajit (do i need to say more?)
+ compilable into bytecode
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)
+ the way require() looks for modules may be irritating to those
who have previously worked with rubys require() or pythons import
statement
+ veeeery tiny standardlib, completely lacking proper
file/directory interactions (but there is still lfs)
+ lacking bitwise operators (there's still the bit module)
+ stackbased API that might confuse new users who have
previously worked with pythons C API or tcls C API (or similar APIs)
+ table interactions can lead to confusing, and long code in the
C API due to stackbased programming
Squirrel:
Pro:
+ classes and namespaces are part of the language
+ easy to learn syntax due to similarity to C++, Java, Javascript
+ almost equally as small as Lua, since it uses Lua as its core
virtualmachine
+ constant and static values are part of the language
Contra:
+ appears to be lacking module support (no require(), no
import), modules have to be linked as static libraries directly into
the vm
+ there doesn't seem to be a standalone compiler for squirrel
scripts (compiling is done from the API)
+ namespace syntax can be a little confusing to new users due to
ambigious arrow assignment (namespace <- { ... })
+ classes can have a constructor, but apparently no destructor
+ slightly overly verbose API (compared to Lua)
Especially the fact that Squirrel seems to lack module support kind of
makes squirrel unsatisfactory for me :(
What do you guys think? Any experience?