Sign in to follow this  
Alfonso Miraglies

AngelScript and static method

Recommended Posts

Hello everybody.
I know in AngelScript the "static" class method is not implemented yet.

By the way, I'm looking for a solution to have something similar.
Do you have any ideas on how to achieve this?

Share this post

Link to post
Share on other sites
In C++ a static class method is just a global function within the namespace of the class. As the access to protected and private members can be given to global functions with the 'friend' keyword, there is really no difference at all besides the syntax.

In AngelScript static methods are not yet available (as you already knew), nor is the friend keyword (probably never will be). While class members can be made private, I sincerely doubt it is done a lot in scripts, so the need for static methods doesn't seem very urgent to me.

Is there a specific reason you want to use static class methods in AngelScript? If you have a specific scenario that cannot be solved without it I'll see if I can prioritize this feature.


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