Quantcast
WoWInterface - View Single Post - Added support for Generic Types with my OOP library
View Single Post
08-25-18, 04:34 PM   #3
Mayron
A Frostmaul Preserver
 
Mayron's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 260
Originally Posted by MunkDev View Post
Unnecessary if you're not a muppet. Read this thread for points against over abstraction.

Plus, the game already has multiple OOP systems in place, why add another one?
I wanted a very basic OOP system that was quick in performance. Originally I created some basic functions to create metatables in a more user-friendly way for inheritance, like using the __call metamethod to instantiate a new table that inherits from the called table. Pretty basic stuff. I don't think helper libraries like this are pointless at all.

Then I wanted some strongly typed parameters and return values which is the main point of the framework. It means I don't need to write so many checks for variables holding the correct values. Also, I can protect code belonging to objects from outside interference so I can eliminate debugging problems. This is the main reasoning behind "why add another one".

It has definitely helped me significantly to develop code faster so it's not pointless at all. The performance so far seems very good unlike the stuff you linked in that post (not run proper tests but I get the impression that the library/framework in that post is heavy in performance/memory costs though I could be wrong...).

I agree that this new feature (generic types) is a bit over the top but it's just an added extra that might rarely be used. It was more of a "this would be a cool experiment to play around with" concept, but the basic features that come with the library are far more useful.

In addition to the implicit debugging support, the OOP features in this library are closer related to Java, C#, etc... than other systems I have seen which, to me at least, feels nicer to use.

Last edited by Mayron : 08-26-18 at 02:45 AM.
  Reply With Quote