Opinions on object oriented programming

BlitzMax Forums/BlitzMax Programming/Opinions on object oriented programming

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

@AngelDaniel

Perhaps if you could provide some implementation details (code samples and practical game examples) that might clarify things.

Your above post is too vague to make much sense.

The handle is detached and allows you to keep control of the fact that the objects are unique, even though they may be acting identically.


But you can do that quite happily in OO code anyway. Just create two intances of a class, and another object to represent any shared data. Each instance has a member variable which points to the shared data object. Use a bitmask to specify which properties of each object are shared, and which are specific to that instance, and store any specific information in another member variable in that object.

In BlitzMAX, since every type extends Object, you can cast any type to any other type.