Class++ | Classes and OOP made easy and powerful with Access Specifiers, function overloading and more!

The first beta version will contain automatic type creation depending on the classData.
This means that you will be able to get type-checking easily for classes within classes, or objects within objects.

2 Likes

Release Version 0.0.1 (New Type Solver Beta)


Hello everyone! This update is about the new re-write of Class++ for the new type solver. This is one of the many updates that will come, so stay tuned.

  • The module has been re-written from the ground up.
    • Main module has been re-written to support the new type solver, and allow for a better experience using Class++.
    • The main API Surface is the same, however certain method behaviors have changed.
    • Replaced the Error API with a much better and expandable Log API.
    • Updated the Type API to make it more compatible and stable (it can even be used as a replacement for built-in type methods), however, method names are changed.
  • Updated Inheritance (Part 1)
    • Removed class.extends method and instead merged the functionality with the class method of the main API.
    • Class++ now supports multi-inheritance.
    • Constructor calling mechanism has been revamped to fix bugs related to parent class constructors not being called properly.
    • Inherited classes now have proper type-checking with the new type solver, this also includes objects.
  • Replacing the Error API with Log API
    • To make debugging easier, Class++ error messages are now more consistent in style and easier to read, and they will now provide links (in Studio) to find more information about the error.
    • Certain error messages now provide more information to make debugging easier.
  • Type API is now more stable and compatible
    • The old Type.typeof() and Type.typeofClass() methods have been replaced with Type.type() and Type.typeof() methods that are more compatible with Luau’s built in type() and typeof() functions. You can even replace the built-in methods with the new Type API methods, and they will still work! (Type API provides type support for class and object userdatas.)
  • Major bug fixes
    • Fixed Friend access specifier not using the class references properly to allow other classes access to Private and Protected members.
    • Fixed overloaded functions not being able to access Private and Protected members of their class.
    • Fixed bugs related to being able to set a class member to nil.
    • Fixed bugs related to inheritance.

:warning: Notes:

  • Because the new type solver is still in beta, certain type-related features may stop working or cause bugs. And even though the new solver is far more capable than the old one, it’s still limited in certain places. That’s why if you encounter an issue, please make a bug report.
    (Due to this, it is not recommended to use this version in production.)
  • This release only contains a certain part of the announced/planned features from the discussions page. Rest of the planned features and more will come soon.

:exclamation: Since this is a beta that relies heavily on the New Type Solver, you must enable it from Beta Features in order to use this version of Class++.
And due to this version being a beta, the download is only on the github page.

2 Likes