I've moved all of my scripting for my game engine over to Squirrel from LuaPlus (currently very simple bindings):
LuaPlus:
LPCD::Register_GlobalPropertySetFunction(state->GetGlobals(),"var1",&var1);
LPCD::Register_GlobalPropertySetFunction(state->GetGlobals(),"var2",&var2);
globalsObj.Register("func1",&func1);
globalsObj.RegisterDirect("func2",*classPtr,&ClassType::memberFunc2);
globalsObj.RegisterDirect("func3",*classPtr,&ClassType::memberFunc3);
globalsObj.RegisterDirect("func4",*classPtr,&ClassType::memberFunc4);
globalsObj.RegisterDirect("func5",*classPtr,&ClassType::memberFunc5);
globalsObj.RegisterDirect("func6",*classPtr,&ClassType::memberFunc6);
globalsObj.RegisterDirect("func7",*classPtr,&ClassType::memberFunc7);
LuaPlus creates all the necessary hooks/callback so that Lua script can access vars & call functions via the names in quotes. No other code is required: it's very fast/easy to bind objects (type checking is also automatically performed).
Squirrel (with SqPlus):
bindVariable(root,var1,"var1");
bindVariable(root,var2,"var2");
SquirrelVM::CreateFunctionGlobal("func1",func1Stub,"t");
SquirrelVM::CreateFunctionGlobal("func2",func2Stub,"s");
SquirrelVM::CreateFunctionGlobal("func3",func3Stub,"si");
SquirrelVM::CreateFunctionGlobal("func4",func4Stub,"ssbf");
SquirrelVM::CreateFunctionGlobal("func5",func5Stub,"sssf");
SquirrelVM::CreateFunctionGlobal("func6",func6Stub,"ssiff");
SquirrelVM::CreateFunctionGlobal("func7",func7Stub);
In Squirrel (using sqPlus), the intial setup is about the same. Stub functions must be used along with type strings (no compiler/template auto-code generation).
However, the stub functions add ~50 more lines of code for this example case. Thus the initial ~10 lines of LuaPlus code becomes ~60 lines of Squirrel/SqPlus code (~6x more code).
Fortunately, my project does not currently require a great deal of script I/O (motion/behavior is mostly physics based). For a project using more complicated scripting, some form of lightweight
template/macro scripting layer would be extremely useful (could reduce script interface code ~6x). LuaPlus's Callback Dispatcher could probably be ported fairly quickly by someone with expert experience in Lua/Squirrel/template-metaprogramming.
After this integration (and low level Squirrel/VM/SqPlus coding), I really appreciate the Squirrel language design and syntax (preferred over Lua script): great job Alberto!
John