v0.4.0
This release is primarily focused upon testing and correctness:
- We have 100% test-coverage of all our internal packages.
- I've added support for the fuzz-testing which is available since v1.18 of the go release.
As a consequence of adding the test-coverage, and fuzzing the project for multiple hours, many many bugs and issues have been found and resolved - most of these were related to testing argument lengths for various sequences, and type-checks for functions. (e.g. (car 3)
is an example of something that is obviously not supposed to work.)
New features introduced in this release:
#
is added for exponent operations, andsqrt
was provided in the standard library to use it.inc
anddec
were embarrassingly implemented the wrong way round. Fixed now.- Added
length
to the standard library to return the number of items in a list. - Division by zero is caught explicitly.
- The new sequence
(error "This is wrong")
was added, to allow user-driven termination of execution. - The ability to set a
context.Context
to the interpreter was added, which is useful to prevent DoS attacks against user-supplied scripts which never terminate. - "
>
" and "=
" were rewritten in Lisp. - The ability to add optional arguments to functions was added, via the "
&
" prefix.
Here's what an optional argument looks like:
(define foo (lambda (a &b &c)
(print "A:%s B:%s C:%s\n", a b c)))
(foo 1 2 3)
(foo 1 2 )
(foo 1 )