Skip to content

v0.13.0

Compare
Choose a tag to compare
@skx skx released this 22 Nov 17:38
· 110 commits to master since this release
caf59f7

Welcome to the latest release of yal.

New Features

This release brings support for struct, which allows defining structures, with named fields.

Struct support is documented in our PRIMITIVES.md reference, but in brief you may define a structure and this will auto-generate several new methods operating upon that structure.

Sample usage might look something like this;

; define a new structure named "pet" with two fields
(struct pet name age)

; create an instance of that structure
(set! spot (struct "Spot" 4))

; Show details via the (auto-generated) access-methods.
(print "%s is %d" (pet.name spot) (pet.age spot))

Type checking works as you'd expect too.

Breaking Changes

The (let ..) special form was removed, instead use (let* ..).

Other Changes

This release features internal cleanups, simplifying our core evaluation method, and breaking out our special forms in a dedicated source-file:

ChangeLog

  • Implemented support for (struct)
    • This allows named objects, with fields, to be passed around and used.
    • Reported in #82, resolved in #93.
  • Reduce the number of times hash-values are evaluated.
    • This was reported in #95, and resolved in #96.
  • Simplified our eval
    • Moved our special-forms into eval/specials.go.
    • Simplified the logic of argument collection
    • Reported in #94, resolved in #97.
  • Updated (type) to return (foo) for a struct named .. foo!
    • Allow type checking of structure types too:
  • Updated the CI process to report errors when pull-requests are made against our repository.
    • Reported in #98, resolved in #102.
  • Remove support for (let ..).
    • This was reported in #100, and resolved in #103.
  • Resolved some issues found by the fuzzer.
  • Moved examples beneath examples/
  • Moved (env) from the core to the builtin-package.

Next Release

The next release will aim to add LSP support for our lisp dialect, as reported in #108 .