here's the first snaphot of squirrel 3.0, is meant just as a preview. The doc is not updated yet and I haven't done extensive test yet. Feedback is welcome.
here's the link http://www.squirrel-lang.org/stuff/squirrel_3.0_prealpha.tar.gz
here are the changes:
-added base keyword to call base methods in a class
class A {
function DoSomthing()
{
::print("I'm A");
}
}
class B extends A {
function DoSomthing()
{
base.DoSomthing();
::print("I'm B");
}
}
-removed delegate keyword and added setdelegate() and getdelegate() table builtin methods
local xx = {
bla = 10,
foo = "asd"
}
local zz = {};
zz.setdelegate(xx);
-removed vargv and vargc keywords, now var args are passed as an array called vargv(as a paramter)
function test(a,b,...)
{
if(vargv.len() > 0) {
foreach(i,val in vargv)
::dosomething(i,val);
}
}
-removed parent keyword added class getbase() and getdelegate() built in method
-instanceof doesn't throw an exception if the left expression is not a class
-lexical scoping for free variables(free variables are no longer in the second parameter list)
//what used to be
local outer = 10;
function (a,b):(outter)
{
return a+b+outer;
}
//now is just
local outer = 10;
function (a,b)
{
return a+b+outer;
}
-sq_setprintfunc accept error func
-sq_geterrorfunc()
-error() built in function(works like print but prints using the errorfunc)
-added native debug hook (look ar sq_setnativedebughook())
ciao
Alberto