Releases: maurits150/simploo
Releases · maurits150/simploo
v3.0.1
v3.0.0
Changelog
This is a full rewrite of simploo. The list below covers major changes but is not exhaustive.
Documentation
Full documentation available at https://maurits150.github.io/simploo/
Interfaces
Define contracts with the interface keyword and implement them with implements. Interfaces can extend other interfaces and provide default method implementations. Enable strictInterfaces config for argument validation (Lua 5.2+).
Serialization
Instances can be serialized with instance:serialize() and reconstructed with Class:deserialize(data). Use the transient modifier to exclude members. Convenience wrappers simploo.serialize() and simploo.deserialize() are also available.
New Modifiers
default- for interface default method implementationstransient- exclude members from serialization
Other
instance:get_member(name)andinstance:get_members()for introspectionhook:remove(hookName [, callbackFn])to unregister hooksbaseInstanceTable,baseSyntaxTable,customModifiersconfig options- Classes in the same namespace can reference each other without
using protectedaccess control now enforced (v2 had the modifier but ignored it)- Custom
__index/__newindexmetamethods viametamodifier instance_of()works with interfaces:player:instance_of(ISerializable)
Performance
- Faster instantiation (only instance variables are copied, functions/statics are shared)
- Faster member access (optimized
__index/__newindex) - Faster
instance_of()checks (O(1) ancestor lookup)
Breaking Changes
__declarerenamed to__register__tostringrequiresmetamodifier__constructcleared after call (prevents double-calling)- Assignment to undefined members now errors
abstractmodifier removed (use interfaces)- Hooks renamed:
onSyntaxNamespace→onNamespaceonSyntaxUsing→onUsingbeforeInstancerInitClass→beforeRegisterafterInstancerInitClass→afterRegisterafterInstancerInstanceNew→afterNew
v2.1.4
Increase version number