by Turtle Kitty
Lisp-like scripting language for cowboy coders.

Vaquero is a Lisp variant with single-dispatch message passing, multiple dispatch via generic procedures, first-class delimited lexical environments, first-class delimited continuations, restartable exceptions, object-capability security on operating system interfaces, and syntactic abstraction via procedural macros.

(proc handler (err kontinue)
   (if (= err 'resume)
      (kontinue 69)
      (if (= err 'default)
         (fail 'aww-hell))))

(guard handler
   (+ 3 2))

; 5

(guard handler
   (+ 3 (fail 'default)))

; 42

(guard handler
   (+ 3 (fail 'resume)))

; 72

(guard handler
   (+ 3 (fail 'crap)))

; (runtime-error aww-hell)

; most system procs throw a more sophisticated error than a symbol

(proc show-it (e k)
   (list e.form e.message))

(guard show-it
   (error 'wrong-way '(go left) "Left was a poor choice."))

; (wrong-way (go left) "Left was a poor choice.")
Information updated 05/04/20
View Comments