The Bad programming language


BadLang is an experimental programming language. It has underwent a number of iterations, from a tree-walking interpreter, to a stack based bytecode interpreter, to natively compiled to ASM/machine code. A series of articles follow the developemnt of the language since its inception. Parts 0 to 6 cover the implementation of the tree-walking interpreter.

The current in-progress implementation follows a more structured approach to its design, the rationale to which can be found in part 7. In summary, the language sheds some of the conventions followed by Lisps and attempts to become a statically typed, ahead of time compiled language with an optimizing compiler. Also, there is support for serializing a bunch of the internal data structures so that they can be visualized via graphviz.

Currently there is a functioning compiler from bad -> C and an advanced work in progress implementation of a self-hosted compiler.

BDL Articles