Skip to content

Latest commit

 

History

History
57 lines (47 loc) · 3.49 KB

CHANGELOG.md

File metadata and controls

57 lines (47 loc) · 3.49 KB

Changes in ZYLISP 6.0.0

  • Project rename
  • Code split into separate packages
  • Function registration cleanup

Features in ZYLISP 5.1.1

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 method Fly on object c that lives within objects a and b.
  • 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, and repl/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.

Additional Features

  • 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 and or)
  • 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..