Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

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

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: XMLMenu - User configurable menu system - completed
Next Topic: SysInfo package
Goto Forum:
  


Current Time: Fri Apr 26 02:35:47 CEST 2024

Total time taken to generate the page: 3.03454 seconds