Skip to content

Releases: Yonaba/30log

1.3.0

24 Oct 13:56
Compare
Choose a tag to compare
  • Added class:create, which allocates a new instance without invoking the class initializer
  • Added 30log-commons.lua
  • Updated specs

1.2.0

03 Oct 20:41
Compare
Choose a tag to compare
  • Added class:cast(), changes the class of an instance

1.1.0

27 Sep 10:57
Compare
Choose a tag to compare

New features

  • Added class:subclasses() returns the list of all classes which extend from class
  • Added class:instances(), returns the list of all instances of class
  • Added class:classOf(), checks if class is a superclass of arg
  • Added class:subclassOf(), checks if class is a subclass of arg
  • Added instance:instanceOf(), checks if instance is an instance of arg
  • Added class:without() to remove a mixin from a class
  • Added class:with(), includes a mixin to a class

Breaking changes

  • Changed implementation of class.isClass, now only checks if arg is a class
  • Changed implementation of class.isInstance, now only checks if arg is an instance
  • Removed class:include()
  • An instance of class is considered to be the instance of any superclass of class
  • A class is considered to be the subclass of any of its direct superclass's superclasses

1.0.0

18 Jan 10:39
Compare
Choose a tag to compare

New features

  • require "30log" now returns a callable table
  • Added class.isClass
  • Added class.isInstance
  • Adding mixins can be chained
  • subclass.super returns the superclass of subclass
  • instance.class returns the class of instance

Breaking changes

  • Changed class prototype to class(name, params)
  • Renamed class:__init() to class:init()
  • Renamed class.__name to class.name
  • Renamed class:extends() to class:extend
  • Renamed class:is() to class:extends
  • Renamed class:has() to class:includes
  • Changed class:extend prototype to class:extend(name, params)
  • Changed tostring(class) and tostring(instance) output.

0.9.1

02 Mar 12:44
Compare
Choose a tag to compare
  • Converted internal registers to tables with weak keys

0.9.0

07 Feb 18:41
Compare
Choose a tag to compare
  • Added class.is and instance.is to inspect inheritance relationship between two objects.
  • Removed spaces in class/instance tostring output.

0.8.0

11 Jan 21:38
Compare
Choose a tag to compare
  • Mixins are now included with include, not with
  • Objects (instances) cannot call new
  • Shortened class/instances __tostring output (class (?) instead of class (Unnamed))
  • Bugfixes for 30logclean (Thanks zorfmorf)
  • Updated specification tests and README

0.7.0

05 Jan 16:01
Compare
Choose a tag to compare
  • Fix for attributes not being overriden with chaining when given a prototype
  • Updated specs
  • Removed class-commons plugin, moved to 30logclasscommons

0.6.0

09 Aug 11:46
Compare
Choose a tag to compare
  • Made class attributes instantly available right after derivation, for faster indexing
  • Made class methods available through initializers

0.5.0

05 Jan 16:03
Compare
Choose a tag to compare
  • Added mixins
  • Added clean source
  • Updated Readme and specs tests