- Project rename
- Code split into separate packages
- Function registration cleanup
Not your average parentheses...
- package mechanism that supports modularity and isolation of scripts/packages/libraries from each other. See tests/package.zy for examples.
- NaN handing that matches typical expectations/Go's answers.
- struct defintion and type checking. See
tests/declare.zy
for examples. - Readable nested method calls:
(a.b.c.Fly)
calls methodFly
on objectc
that lives within objectsa
andb
. - Use
zylisp
to configure trees of Go structs, and then run methods on them at natively-compiled speed (since you are calling into Go code). - sandbox-able environment; try
zylisp -sandbox
and see the NewGlispSandbox() function. -
emacs/zylisp.el
emacs mode provides one-keypress stepping through code. - Command-line editing, with tab-complete for keywords (courtesy of https://github.com/peterh/liner)
- JSON and Msgpack interop: serialization and deserialization
-
(range key value hash_or_array (body))
range loops act like Go for-range loops: iterate through hashes or arrays. -
(for [(initializer) (test) (advance)] (body))
for-loops match those in C and Go. Both(break)
and(continue)
are available for additional loop control, and can be labeled to break out of nested loops. - Raw bytes type
(raw string)
lets you do zero-copy[]byte
manipulation. - Record definitions
(defmap)
make configuration a breeze. - Files can be recursively sourced with
(source "path-string")
. - Go style raw string literals, using
`backticks`
, can contain newlines and"
double quotes directly. Easy templating. - Easy to extend. See the
repl/random.go
,repl/regexp.go
, andrepl/time.go
files for examples. - Clojure-like threading
(-> hash field1: field2:)
and(:field hash)
selection. - Lisp-style macros for your DSL.
- optional infix notation within
{}
curly braces. Expressions typed at the REPL are assumed to be infix (wrapped in {} implicitly), enhancing the REPL experience for dealing with math.
- Go-style comments, both
/*block*/
and//through end-of-line.
- ZYLISP is a small Go library, easy to integrate and use/extend.
- Float (float64), Int (int64), Char, String, Symbol, List, Array, and Hash datatypes builtin.
- Arithmetic (
+
,-
,*
,/
,mod
,**
) - Shift Operators (
sll
,srl
,sra
) - Bitwise operations (
bitAnd
,bitOr
,bitXor
) - Comparison operations (
<
,>
,<=
,>=
,==
,!=
) - Short-circuit boolean operators (
and
andor
) - Conditionals (
cond
) - Lambdas (
fn
) - Bindings (
def
,defn
,let
,letseq
) - Standalone and embedable REPL.
- Tail-call optimization
- Go API
- Macro System with macexpand
(macexpand (yourMacro))
makes writing/debugging macros easier. - Syntax quoting -- with caret
^()
instead of backtick. - Backticks used for raw multiline strings, as in Go.
- Lisp-expression quoting uses
%
(not'
; which delimits runes as in Go). - Channel and goroutine support
- Full closures with lexical scope.
See the wiki for lots of details and a full description of the ZYLISP language..