Stabel

Small Safe Portable

Minimal, yet flexible

The syntax and semantics of Stabel uses reverse polish notation, meaning the function name comes after its arguments. This frees the syntax of many control characters while the semantics consist of a few, but powerful, rules.

                def: main
                : 2 increment 

                def: increment
                : 1 +
            

Code in Stabel consists of whitespace-separated functions which are called in a left-to-right fashion. The return value, or values, of a function call serve as the input arguments for the next function call. Numbers are functions which return themselves. This is known as concatenative programming.

Easy to reason about

A strong, static type system helps you prevent bugs and document your code. Errors and IO are represented in the type system, so that forgetting to deal with a certain error condition is caught at compile time. All data structures in Stabel are also immutable, which greatly reduces the number of states your program can be in, which again makes your code easy to reason about.

                Compilation failed:

                9 | def: some-word
                10| type: -- Bool
                11| : 1

                The type of 'some-word' is specified to be  -- Bool

                However, it seems that the actual type is:  -- Int
            

Portable

Your code can run on the command line, on a server or even in the browser. Stabel is compiled to WebAssembly, so you're sure to enjoy the same semantics wherever your code is executed.

In Alpha

Stabel is still in early development. There are currently no strings, arrays or even garbage collection. All of this will come in time. For more information, take a look at the roadmap.