Object Oriented: Everything bases on Objects with methods.
This is something Max2D extremely fails.
There is no drawback with OO designed modules as well, because it is FAR easier to create a procedural wrapper for a fully OO designed module than it is to create an OO wrap over a mixed structure as Max2D is (max2d uses objects but the methos are mainly for internal use. External is procedural only).
From that point of view, Max2D is just struct based as the "documented use" of Max2D is procedural only, using Types only as container for information, not as objects.
In the later, OO extension is very hard to do as the functionality is not OO (you need to reimplement all the functionality again instead of just overloading what you don't want to change) and sadly this is exactly the way many BM main modules work.
I'm aware that functions taking TTest will take extended as well. But functions are not encapsulated. They are somewhere and can be anywhere as long as they know of TTest in some way.
This is something Max2D extremely fails.
There is no drawback with OO designed modules as well, because it is FAR easier to create a procedural wrapper for a fully OO designed module than it is to create an OO wrap over a mixed structure as Max2D is (max2d uses objects but the methos are mainly for internal use. External is procedural only).
From that point of view, Max2D is just struct based as the "documented use" of Max2D is procedural only, using Types only as container for information, not as objects.
' OO Design Type TTest method sprint() print "Test" end method end type Function TTest_sprint(obj:TTest) obj.sprint() end function
' Mix Design Type TTest field dummy:int end type Function TTest_sprint(obj:TTest) obj.sprint() end function
In the later, OO extension is very hard to do as the functionality is not OO (you need to reimplement all the functionality again instead of just overloading what you don't want to change) and sadly this is exactly the way many BM main modules work.
I'm aware that functions taking TTest will take extended as well. But functions are not encapsulated. They are somewhere and can be anywhere as long as they know of TTest in some way.