/arbre

Arbre is an experimental pure functional programming language based on trees

Primary LanguageHaskellGNU General Public License v2.0GPL-2.0

Arbre is a tree-based functional, concurrent programming language.

= Syntax =
Unlike most languages, Arbre does not have a fixed concrete syntax or parser.

There are two dialects of Arbre: formal and colloquial.

Formal Arbre can be encoded as either JSON or YAML. The encoding format has now moved to Haskell literal data structures.
Colloquial Arbre is generated from formal Arbre and has a pleasant syntax inspired by python and ruby.

The end goal is to develop an editor that displays colloquial Arbre that is generated live from an underlying formal equivalent.
The formal version is what the editor acts on and saves.

= Semantics =
Arbre is a pure functional language. Each function definition can make one function call, which may have arguments that are also functions that must be unwound. Functions can also take blocks are arguments.

There are no special forms or keywords, only function calls, symbolic references, literals, and blocks.

There are no builtin flow control constructs such as loops or non-local returns.

Values are immutable.

The language can be extended by defining new Arbre functions, which can be written in Arbre or can wrap native functions, which are written in the host language (currently Haskell).

Syntax can be extended by attaching views to function definitions. When the code is translated from formal to colloquial Arbre, the views are used to rewrite the code to apply syntax such as keywords, infix operators, and nested block formatting (for example, indentation).

= Implementation =
The current actively development version of the interpreter is written in Haskell.

There is no VM. The interpreter walks the AST and does tree transformations to execute computations.

= Related Work =
Major influences are:

Dylan - lisp but with Algol syntax
Self - Minimal syntax based on objects instead of lists
Ruby - leader of the pleasant, concise syntax revolution
Haskell - inventor of monads, first implementation of software transactional memory in a language
Clojure - Persistent collections, concurrency semantics, the most modern lisp

Related languages you should check out if you are interested in Arbre:

CoffeeScript - Javascript, but without all of the badness and brokenness of Javascript
http://coffeescript.org/

Pico - lispy, but with minimal syntax, tables instead of lists, no special forms, infix operators
http://pico.vub.ac.be/

Brat - minimal syntax with objects and closures providing functionality normally done with keywords
https://github.com/presidentbeef/brat/

Cobra - pythonic syntax, contracts
http://cobra-language.com/

mirah - Ruby syntax for Java
http://mirah.org/

Picola (not related to Pico) - extremely minimal syntax based on forms, implements the pi calculus

= Future Plans =
Mutable state and IO through monads - first class mutations and message sends
Server container for writing functional servers
Software transactional memory
Objects
Interfaces
Persistent collections
Memoization of function calls
Optimized tail recursion