Bond

What is Bond?

Bond is a lightweight bytecode interpreted embeddable scripting language implemented in C++. The language has a familiar procedural syntax, and the runtime aims to have a simple and lean architecture.

Key Features

Fully implemented in standard C++

Bond does not have any dependencies on external libraries or technologies, which makes it portable to any platform with a modern C++ compiler.

Familiar syntax, semantics and scoping rules

Bond is a procedural language that borrows most of its syntax, semantics and scoping rules from other programming languages. In fact, it is very similar to C in many respects. Its static typing system is also an invaluable tool that enables syntax and semantic errors to be caught at compile time.

Low overhead

The Bond Virtual Machine strives to be as minimal and simple as possible in order to incur as few costs as possible. It has a small memory footprint with no surprise memory allocations at runtime. The combination of scope-based and explicit resource management also implies that there is no performance cost for automatic garbage collection. Symbols in Bond source code are resolved at compile or load time, so there are no runtime symbol table look-ups. Furthermore, compiled bytecode can even be shared between multiple independent virtual machines.

Easy to embed

All of Bond's functionality is encapsulated in a library that does not depend on any global variables. It is worth noting that the command line tools are written as thin layers around this library in the same way that developers would embed Bond into their own applications.

Modular design

Bond's modular design makes it easy to replace components, such as memory allocators and output streams, to adapt it to an application's needs. It is also possible to reuse components, such as the lexer and parser, to build new tools to manipulate Bond source code.

Extendable with native code

Bond scripts can call native functions implemented in C++ and can also manipulate C++ object instances without requiring them to be wrapped in proxy objects.