Skip to content

v2.3.0

Latest
Compare
Choose a tag to compare
@senseiwells senseiwells released this 12 Mar 01:01
· 13 commits to main since this release

v2.3.0

What's new?

  • Implemented readonly keyword. Add this to fields to make them read-only.
  • Implemented private keyword. Add this to fields/methods/constructors to make them only accessible within the declaring class.
  • Constructors can now be delegated by omitting the parenthesis and arguments: delegate = new X; delegate();
  • foreach now accepts any Iterator as well as Iterable for iterations.
  • Added some more methods to Iterable and List classes:
    • <List>.slice(iterable), allows you to slice a list.
    • <Iterable>.first(predicate), allows you to find the first element that meets a predicate.
    • <Iterable>.has(predicate), allows you to check whether the iterable has an element that meets a predicate.
    • <Iterable>.all(predicate), allows you to check whether all elements in the iterable meet a predicate.

Bug Fixes:

  • Fixed a bug when extended a class with no constructors not initialising the super class properly.
  • Fixed a bug where java methods could not be delegated by reference.
  • Fixed a bug where shifting operators could not be applied to java values.
  • Fixed a bug where type hinting a class declared later than the hint would throw an error.

For Developers:

  • Since the last release some minor API changes have been made. Notably the annotation documentation
    has changed, the API documentation has been updated to reflect this. The old documentation system
    has been deprecated and will be removed in future.
  • Some classes have been moved around - mostly internal classes which will have no effect on API usage.
  • Most notably a lot of the code and API is completely documented with KDocs.