by Mikel Evins
Object-oriented, dynamic Lisp-like language.

Bard is a small, high-level, general-purpose programming language. It is interpreted, dynamic, and impurely functional. It has a unique object system influenced by, but different from, CLOS.

Bard organizes most of its features into protocols, which are collections of related functions. Classes are used in protocols to define the roles of values.

Bard provides a traditional Lisp-style macro system for extending the language syntax, and several built-in features of the language are implemented as macros.

Bard provides a few powerful control constructs, including upward continuations for nonlocal exits, and dynamic stack guards that can guarantee that certain code executes even if an error or other abnormal exit is taken.

(define constant N (limited <fixnum> :minimum 1 :maximum nothing))

(define method (fib n)
  with {n (exactly 1)}
  1)

(define method (fib n)
  with {n (exactly 2)}
  1)

(define method (fib n)
  with {n N}
  (+ (fib (- n 1))
     (fib (- n 2))))
Information updated 01/22/14
View Comments