Skip to content

Releases: TenebrisNoctua/ClassPP

Version 2.0.0

21 Nov 21:10

Choose a tag to compare

Release Version 2.0.0

Here we are! After more than 7 months, 2.0.0 is finally here. With the general release of the new type solver, Class++ 2.0 feels finally ready to be released.

I would like to thank everyone who used Class++, reported bugs, and sent feedback. Without them, I wouldn't be able to make Class++ as good as it is now. Feel free to make more bug reports if you encounter them!

Below is a general change-log of everything from the new type solver beta releases to this release. There are lots of things that you need to know about.

Changes from 1.2.1

  • Class++ has been re-written from the ground up.
    • The source code of Class++ has been re-written from scratch for the new type solver. This is to support the new advanced type features that allows Class++ to be more intelligent than ever before.
    • Now using the new @self alias with require-by-string in the modules.
    • The main API surface is generally the same, however, the inheritance syntax and certain methods have been changed.
  • An object will now have auto-completion for certain default methods.
  • Updated Inheritance
    • Deprecated the class.extends method and instead merged the functionality with the class function of the main API.
    • Added multi-inheritance.
    • Changed the Protected Access Specifier behavior to allow for a better overwriting system. (Similar to C++)
    • Automatic parent class constructor calling has been removed.
    • Constructors and destructors are no longer inherited.
    • Added super().
      • super is a new default method of an object, which allows you to access parent class methods from child classes.
      • super, when called in a class method, calls the method with the same name in the parent class of the class it's been called from.
      • super can be used both in normal class methods and constructors, allowing you to create chain systems like in other OO languages.
  • Major Type Overhaul
    • The old Type API has been replaced with a better and a more consistent one.
      • The old Type.typeof() and Type.typeofClass() methods have been replaced with Type.type() and Type.typeof() methods that are more compatible and consistent with Luau's built-in type() and typeof() functions. You can even replace these built-in methods with Class++'s Type API, and your code will still work!
    • Class and Object types are now far more advanced than they were ever before, the object type now supports auto-complete for all of the members (including private and protected) in the classData table.
    • class.new now reflects the parameter types of the defined constructor function in the classData table. This also includes inherited classes.
    • In inherited class objects, private members will now properly show up in the auto-complete.
    • When a class member is set to false in the classData table, Class++ will now show it as any, instead of boolean. This is to reduce type errors when first defining members in the classData table. (You can go around this by casting or annotating it to boolean later.)
    • The type system is now more consistent and faster.
  • Automatic Object Destruction
    • Class++ now mostly, if not entirely, removes the need to manually track your objects. It will now automatically track and detect when your objects are no longer referenced in runtime, and if so, will then destroy the object.
    • When an object no longer has any references:
      • If the object has already been destroyed with the :Destroy() method, the internal objectData will properly be disposed of. (Recommended)
      • If the object hasn't already been destroyed, destructor (if it exists) will be called with a copy of the objectData. This is to ensure backwards compatibility, and to make this system properly work. The copy objectData should never be held onto, as after destructor runs it will immediately be disposed of.
      • This can be configured through the new autoObjectDestruction property of the main API.
      • destructor functions will now emit a non-fatal error from Class++ when an error occurs in the function.
  • Replaced the Error API with Log API
    • Class++ now has an advanced Log API, unlike the simple and old Error API, it allows for different kinds of output messages.
    • 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), allowing you to find more information about the error.
    • Certain error messages now provide more information.
  • General Improvements and Bug Fixes
    • Class creation is now faster.
    • Object creation is faster in certain cases. (e.g when autoObjectDestruction is disabled)
    • Object indexing is now faster.
    • Destroy() can no longer be called within constructors.
    • Class++ will now properly clean threads and RBXScriptConnections inside objects, alongside Instances.
    • 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 allowing you to re-define members in different access specifiers.
    • Fixed an internal bug with operator overloading.
    • Fixed a bug where indexing the class object would allow you to bypass the classData restrictions.
    • Fixed major bugs related to object and class creation.
  • Updated the Documentation
    • Documentation now has a brand new interface, with better colors and style.
    • All of the sections have been completely re-written with better wording and examples.
    • Documentation now has new sections and a better API reference.
    • Documentation will still show 1.2 as an older version.

Version 0.5.0 (New Type Solver Beta)

23 Aug 17:04
eb8ccef

Choose a tag to compare

  • Improvements to Inheritance and Constructors:
    • super() can now be called within constructors to access parent constructors.
    • super() can now be called both within normal class functions and constructors in a chain system. This now makes it possible for systems such as constructor chaining to exist with Class++.
    • With these changes to super(), automatic parent class constructor calling has now been removed.
    • super() can no longer be called without its object argument.
    • Constructors and destructors are no longer inherited.
  • Improvements to Types:
    • In inherited classes, class.new() will now have the correct argument types for the parameter types in the constructor function.
    • In inherited class objects, private members will now properly show up in the auto-complete.
    • The type system is now more consistent and faster internally, and many bugs have been fixed. This means you will get auto-complete faster with less issues.
    • class.new() will also be more forgiving in the strict type-checking mode for arguments.
  • Others:
    • Object creation is now faster.
    • Class creation is now faster.
    • The version number in the main module is now consistent with the actual version.
    • Fixed a bug where indexing the class object would allow you to bypass the classData restrictions.

Version 0.4.0 (New Type Solver Beta)

22 Jun 21:39
97224dc

Choose a tag to compare

Release Version 0.4.0 (New Type Solver Beta)

  • A major bug with object creation has been fixed. If you've been having problems with multiple objects sharing the same value, please use this version. (#13)
  • destructor functions will now emit a non-fatal error from Class++ when an error occurs in the function.
  • Some internal bug fixes and changes.
  • Updated the documentation.

Version 0.3.0 (New Type Solver Beta)

24 May 20:20
97224dc

Choose a tag to compare

Release Version 0.3.0 (New Type Solver Beta)

  • Class++ will now properly clean threads and RBXScriptConnections inside objects, alongside Instances.
  • Garbage collection system is now faster, though it may slow down object creation. (By ~3us)
  • Garbage collection system can now be configured through autoGarbageCollection property of the main API.
  • Class creation should be faster.
  • Object creation is now faster. (If autoGarbageCollection is false)
  • super() is now faster.
  • An internal bug with operator overloading has been fixed.
  • Certain internal functions should now work faster.
  • Updated the Documentation.

Version 0.2.0 (New Type Solver Beta)

18 May 14:05
97224dc

Choose a tag to compare

Release Version 0.2.0 (New Type Solver Beta)

  • Fixed #10.
  • Now using the new @self alias with require-by-string in the modules.
  • Added Automatic Destructor System.
    • Every object that hasn't been properly destroyed will now automatically be destroyed by Class++. This greatly reduces memory leaks.
    • When an object no longer has any references:
      • If the object has already been destroyed with :Destroy(), internal objectData will properly be disposed of. (Recommended)
      • If the object hasn't already been destroyed, destructor (if it exists) will be called with a copy of the objectData. This is to ensure backwards compatibility, and to make this system properly work. The copy objectData should never be held onto, as after destructor runs it will immediately be destroyed. After the destructor runs, internal objectData will properly be disposed of.
  • Performance Updates
    • Class++ now uses methods such as binary search to make internal retrieval methods faster.
    • Indexing objects are now much faster.
  • Reserved functions super and Destroy can no longer be called within certain functions.
    • super() can no longer be called within destructors and constructors.
    • Destroy() can no longer be called within constructors.

Version 0.1.0 (New Type Solver Beta)

01 May 18:25
97224dc

Choose a tag to compare

Release Version 0.1.0 (New Type Solver Beta)

  • Updated Inheritance (Part 2)
    • Added super().
    • Changed the Protected Access Specifier behavior to allow for a better overwriting system. (Similar to C++)
  • Type.type and Type.typeof functions have been updated to better support objects.
  • class.new now reflects the parameter types of the defined constructor function in the classData table.
  • The object will now have auto-completion for certain default methods.
  • Removed unnecessary message templates.
  • Fixed bugs allowing you to re-define members in different access specifiers.
  • Improved performance.

Version 0.0.1 (New Type Solver Beta)

17 Apr 20:32

Choose a tag to compare

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.

⚠️ 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.
  • 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.

Version 1.2.1

27 Feb 17:28

Choose a tag to compare

Release Version 1.2.1

  • Fixed overloaded functions not being able to access Private or Protected members of their class.
  • Fixed #2
  • Fixed Class++ allowing a member to be set to nil. This creates problems where when that member is set to nil, it no longer exists within the objectData, thus it not being able to be set again later.
  • Class++ now automatically creates certain access specifiers internally, so you don't have to declare empty access specifiers in the classData table in order to create functions with the outside class definition.
  • Class++ now warns you if you're using methods that will be changed/removed in a future update. This can be silenced by setting the silenceUpdateWarning attribute in the module instance to true.
  • Changed the default module name when imported from the .rbxm file from "Class++" to "ClassPP" to increase compatibility.

Version 1.2.0

17 Oct 13:49

Choose a tag to compare

Release Version 1.2.0

  • class.Inherits and class.Friends properties no longer store classes in a Dictionary. They're now stored in an Array.
  • Constructors in inherited classes will now call the base class's constructor first. Then the derived class's constructor will be called next.
    This is to match how C++ handles constructors.
  • The classMemberNotFound error will no longer stop the running thread. (NonFatal)
  • In the Error API, logErrorNonFatal method will now correctly display the stack trace.
  • Bug fixes and performance improvements.

Version 1.1.0

07 Sep 01:45
2b6e9dc

Choose a tag to compare

Release Version 1.1.0

  • Class++ objects now support type checking! This was an update that I was planning to do for a very long time, and it would not have been possible without @ZyroCrimson.
    • All of the created objects should now have type completion for the members stored in the Public access specifier.
    • Creating custom types is no longer needed, however, if you still want to use the full features of type checking in Luau, it's still recommended that you use custom types for your classes.
    • For more info and examples, check out this documentation page.
  • Util and Type modules now fully support the class type.
  • Updated the documentation.