Sign in to follow this  
randomguy123451

support for closure

Recommended Posts

Sory for the trouble.
This is probably the last language feature - i am asking about .[img]http://public.gamedev.net/public/style_emoticons/default/huh.gif[/img]

[b]whether "closures" are supported or atleast are in the immediate roadmap.[/b]

Actually, first moving into the task of exposing my C++ classes into angelscript, i need to make sure that the angelscript or any scripting language is apt for me.
Right now, i am evaluating between
NullC ( http://code.google.com/p/nullc )
and angelscript
and some other choices .
and the closures and exceptions are my main humble requirements from the scripting language or should atleast be in the immediate roadmap.
Thanks in advance[img]http://public.gamedev.net/public/style_emoticons/default/rolleyes.gif[/img]

Share this post


Link to post
Share on other sites
For further conceptual information on "closure", kindly refere to these url

closure in ruby
[url="http://samdanielson.com/2007/9/6/an-introduction-to-closures-in-ruby"]http://samdanielson.com/2007/9/6/an-introduction-to-closures-in-ruby[/url]



closure in nullC ( lua like smallsize language)
[url="http://code.google.com/p/nullc/"]http://code.google.com/p/nullc/[/url]


closure in groovy
[url="http://groovy.codehaus.org/Closures"]http://groovy.codehaus.org/Closures[/url]

closure in C#
[url="http://csharpindepth.com/Articles/Chapter5/Closures.aspx"]http://csharpindepth.com/Articles/Chapter5/Closures.aspx[/url]

so , whether angelscript currently or in future support closure?



[quote name='randomguy12345' timestamp='1318224435' post='4870976']
Sory for the trouble.
This is probably the last language feature - i am asking about .[img]http://public.gamedev.net/public/style_emoticons/default/huh.gif[/img]

[b]whether "closures" are supported or atleast are in the immediate roadmap.[/b]

Actually, first moving into the task of exposing my C++ classes into angelscript, i need to make sure that the angelscript or any scripting language is apt for me.
Right now, i am evaluating between
NullC ( [url="http://code.google.com/p/nullc"]http://code.google.com/p/nullc[/url] )
and angelscript
and some other choices .
and the closures and exceptions are my main humble requirements from the scripting language or should atleast be in the immediate roadmap.
Thanks in advance[img]http://public.gamedev.net/public/style_emoticons/default/rolleyes.gif[/img]
[/quote]

Share this post


Link to post
Share on other sites
Looking at the links you provided, it does not seem like Angelscript supports closures natively. However, you could probably implement them yourself somehow. The language already supports function handles, which behave in a similar manner to C function pointers, but only for global functions at this time. Remember that whatever the language does not have you could always implement yourself without having to delve into the guts of the language yourself.

Share this post


Link to post
Share on other sites
No closures are not supported. Though much of the same functionality can be achieved with classes and interfaces.

It's something I have on my radar, though I'm not sure I will implement closures to their full-extent. Especially the part where they have access to local variables after the local variables (even after they have gone out of scope).

I admit that as a C++ developer I haven't really had much contact with closures, so I do not fully understand their usefulness. However, the things they are based on I find very interesting, delegates, lambda functions, etc.

Share this post


Link to post
Share on other sites
Hidden
again thanks for the positive roadmap.
Closures are very much really needed for scripting language , esp.
They lead to lesser and lesser amount of code esp. in the GUI handling ,mathematical computation and maps,lists etc handling. Reduces the clutter and chances of bug by a lot.
The source code with closure also seem to very natural and logical .
[img]http://public.gamedev.net/public/style_emoticons/default/rolleyes.gif[/img]

Share this post


Link to post
again thanks for the positive roadmap.
Closures are very much really needed for scripting language , esp.
They lead to lesser and lesser amount of code esp. in the GUI handling ,mathematical computation and maps,lists etc handling. Reduces the clutter and chances of bug by a lot.
The source code with closure also seem to very natural and logical .
[img]http://public.gamedev.net/public/style_emoticons/default/rolleyes.gif[/img]

Share this post


Link to post
Share on other sites
may i request you to keep a roadmap weboage on angelscript homepage(www.angelcode.com/angelscript )
the goals link ([url="http://www.angelcode.com/angelscript/goals.asp"]http://www.angelcode.com/angelscript/goals.asp[/url] ) there is different from upcoming/wishlist features , which will be a list of user's approved requests by you.
may be version number and feature can be given, but **no timeline** of the version number, if you can't promise so.
for example: [url="http://groovy.codehaus.org/Roadmap"]http://groovy.codehaus.org/Roadmap[/url]

This will atleast keep users interested by having an opinion that "though this language has no feature X, but may be developer is interested, so i can start integration of my classes today, so that whenever that feature comes i will be ready." OR he may have an alternative opinion that "Though this language has no feature X, and this is essential for me, hence i should look for some other scripting language".
As in this thread in 2009 [url="http://www.gamedev.net/topic/533245-1bind-static-member-func-2namespace-in-angelscript/"]http://www.gamedev.net/topic/533245-1bind-static-member-func-2namespace-in-angelscript/[/url] , you had said that namespace is on you todo list.


MOST IMPORTANTLY: by having this roadmap web page , If somebody needs a feature X which is already is in your approved roadmap(todo list), then he may financially contribute you/angelscript so that you can implement that feature 'early;.

Here is a sample roadmap like:
in roadmap These features may be in core or as an addon
namespace (version 3.1)
exception (Version 2.9)
autoboxing (version 2.9)
closure (version 2.7)

Not in roadmap:
mixin
multiple inheritance

Share this post


Link to post
Share on other sites
Have you seen http://www.angelcode.com/angelscript/wip.asp? :)

It's not exactly a road map, but it should give you a view of the future. I don't like to make too fixed plans for the future. I change prioritation of new features based on user requests, my own interest, usefulness and the complexity to implement.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this