Home » Developing U++ » UppHub » Squirrel - the programming language
Re: Squirrel - the programming language [message #34489 is a reply to message #34480] |
Fri, 25 November 2011 14:24 |
|
mdelfede wrote on Fri, 25 November 2011 02:42 |
@Unodgs : I like squirrel because it's simple, powerful and it forces you to declare variables, even if untyped.... I hate javascript because of this lack which makes very easy to introduce hidden bugs just because of mispelled vars.
|
I tried this binding utility and I must say I didn't expect it to be so easy.
struct Test {
void SayHello() {
Cout() << "Hello\n";
}
};
.. bindings ...
RootTable(vm).Bind("Test", Class<Test>(vm)
.Func("SayHello", &Test::SayHello)
);
Test globTest;
RootTable(vm).SetInstance("globTest", &globTest);
.. and the script ..
local test = Test();
test.SayHello();
globTest.SayHello();
This is just awesome! As for JS - I'm not a huge fan either (I don't like broken == operator and few other weird things) but if it comes to declaring variables you can use var everywhere and new strict mode. That should help.
@SenderGhost: Thank you for sharing Squirrel language - I didn't know this one.
[Updated on: Fri, 25 November 2011 14:26] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Mon Jun 03 23:02:47 CEST 2024
Total time taken to generate the page: 0.02395 seconds
|