Jump to content
  • Advertisement
Sign in to follow this  
Arelius

Object Implementation in Script

This topic is 4604 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

Is Object Implementation and Decleration a Planned feature? For my project it would be a necessary evil(good?), If so, I would like to offer a hand in completion of such, and if not. I would like to hear opinions about style, and implementation of such, as That is the major issue holding me back from using AngelScript Nicholas "Indy" Ray

Share this post


Link to post
Share on other sites
Advertisement
Do you mean 1st class objects or POD types?

Angelscript already has POD types available, and shortly to be released there will be functions added to script declared structs.

Share this post


Link to post
Share on other sites
I'm planning on implementing class methods and constructors for version 2.5.1. The version after that will hopefully include inheritance as well for script declared classes.

For now I will pretty much follow the C++ way of doing it. In a future version, or perhaps in a parallel project, I may implement other ways of supporting object oriented programming.

Share this post


Link to post
Share on other sites
Do you think you would go the D way of inheritance? In that multiple inheritance is accomplished through mixins rather than straight multiple inheritance?

Share this post


Link to post
Share on other sites
I need to read up on how the D language implements multiple inheritance. Or perhaps you could give me an overview of how it works in D?

Seeing as I have a much greater knowledge of C++ than any other language, it is likely that I'll go with the C++ way. But nothing has been decided yet.

Share this post


Link to post
Share on other sites
I'm not strong on the D implementation, I've only skimmed the docs a few times, but the basic jist of it is that it implement single inheritance and I'm pretty positive virtual inheritance in a manner very similar to C++, except when it comes to multiple inheritance.

D provides what it calls mixins. A better explanation can be found here:

http://www.digitalmars.com/d/mixin.html

Share this post


Link to post
Share on other sites
From what I understood the concept of 'mixin' in D is not related to class inheritance. 'mixin' seems to be more like macros than anything else.

Share this post


Link to post
Share on other sites
'Mixin' is an idiom used in C++ too. D's are little more than macros. Java offers interfaces instead of multiple inheritence. As usual, C++ favors power over safety. Multiple inheritence is error prone, but more powerful than either other implementation.

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!