3 ms·
I did a fork of Squirrel -> SquiLu https://github.com/mingodad/squilu https://github.com/mingodad/squilu because I found the syntax more familiar and also been
by mingodad 10y ago
I did a fork of Squirrel -> SquiLu https://github.com/mingodad/squilu https://github.com/mingodad/squilu because I found the syntax more familiar and also been made with C++ that make create extensions easier than plain C.
Then I started adding more and more C/C++ like syntax options with the idea to have a way to develop fast prototypes in a way that could be migrated to C/C++ when performance was not good enough, the idea is to be able to parse and accept C/C++ syntax but without actually inforce it at scripting level (accept discard/warning) and be able to use a real C++ compiler to do the heavy work.
Example:
class Klass
//struct Klass
{
int_t i;
//constructor()
Klass()
{
print("Klass constructor", i);
}
~Klass()
{
print("Klass destructor");
}
}
Klass k = new Klass();
typedef int_t int;
int test10(int x)
{
dente:
if(x > 10)
{
goto dente;
goto done;
return true;
}
done:
return false;
}
print(test10(23));
output:
test-class-constructor.nut:22:6 warning labels are only parsed right now
test-class-constructor.nut:25:7 warning goto is only parsed right now
test-class-constructor.nut:26:7 warning goto is only parsed right now
test-class-constructor.nut:29:5 warning labels are only parsed right now
Klass constructor (null : 0x(nil))
true
- mingodad 10y agoBut now Haxe http://haxe.org/ http://haxe.org/ has several advantages that's worth consider.
- mingodad 10y agoAlso worth look at Skew http://skew-lang.org/ http://skew-lang.org/
- mingodad 10y agoIdeally it'll lead to something like Terra http://terralang.org/ http://terralang.org/ or Cxx.jl https://github.com/Keno/CXX.jl https://github.com/Keno/CXX.jl