Panda 0.2.0-alpha

Happy New Year! 🎊 And may the odds be ever in your favor.

Finally, after 4 months, Panda 0.2.0-alpha has been released. Most of the changes affected Panda internals, but as a result we have finally features such as generic types! Panda Woah

Changes in language:

  • GH-556 Added a new type system, based on signatures, with generic type support
module lang

main {
    /* Parametrized instance */
    Foo<String> parametrizedType = new Foo<String>('test')

    /* Parametrized return type */
    String parametrizedValue = parametrizedType.getValue()

    /* Parametrized arguments */
    parametrizedType.setValue(parametrizedValue)

    /* Parametrized reassignation */
    Foo<String> sameParametrizedType = parametrizedType
    Foo<Object> lowerParametrizedType = sameParametrizedType
    Bar<String> lowerBaseType = sameParametrizedType
    Bar<Object> lowerBaseAndParametrizedType = sameParametrizedType
}

type Foo<V> : Bar<V> {
    constructor (V barValue) {
        base(barValue)
    }
}

type Bar<V> {
    internal mut V value

    constructor (V value) {
        this.value = value
    }

    shared setValue (V value) {
        this.value = value
    }

    shared getValue () -> V {
        return value
    }
}
  • GH-556 Other changes:

    • Removed [] based arrays
    • Supported not keyword as an alternative to ! logical negation
    • Added autocasts between primitive types

Changes in API:

  • GH-556:

    • Magic free implementation of parser API
    • Removed Parser Bootstrap API - dependency injection based abstraction layer for business-like parsers
    • Replaced mutable component based context API with predefined immutable context with generic subject
    • Removed recursive assignation parser
    • Removed expression transactions
    • Removed all deprecated pattern systems like: linear pattern, functional pattern, custom pattern
    • Removed unused classes and renamed a lot of domain objects
    • Simplified some internals
    • Bump dependencies

Download:

Installation: panda-lang.org/install
Developers: panda-lang.org/guide#installation

Archives: