• Advertisement
Sign in to follow this  

Interfaces in the script language are available in SVN

This topic is 4281 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've just committed the addition of interfaces in the script language to the SVN. There is still a lot to do before I release the next version 2.7.0, but the interfaces are working (even though they are currently very slow). You can now write code like:
interface MyIntf
{
  void DoSomething();
}

class MyClass : MyIntf
{
  void DoSomething() { print("Doing something\n"); }
}

void Test()
{
  MyClass a;
  MyIntf @b = a;
  b.DoSomething();
}
I'm sure you can see the potential of this. Some of the things I still need to implement: - Saving/loading bytecode with declared interfaces. - Faster resolution of calls to interface methods. - Registration of interfaces from the application so that the script classes can be passed directly to application registered functions. - Explicit casting from interface to class. Gives a null handle if the cast is illegal.

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement