Bon is a programming language designed with simplicity, performance, and safety in mind.
Branch: master
Clone or download
FBMachine Fix bug unifying typeclass methods with args containing type parameters
Fix type inference bug in blocks built with separator binop
Fix bug with ownership transfer in function call (double free)
Implement Eq typeclass for bool
Call out vec::push taking ownership of arg in function signature
Add vec::erase function
Workaround for "self.v[0]" being parsed with wrong precedence
Add associative array example
Latest commit f54a266 Feb 14, 2019

README.md

Introduction

Bon is a programming language designed with simplicity, performance, and safety in mind. If you just want a quick tour of the language, you can start here.

Simplicity

In all aspects of its design, Bon aims to be succinct, yet readable.

Code written in Bon tends to look similar to a scripting language such as Ruby or Python:

def fib(x)
    if x < 2
        x
    else
        fib(x-1) + fib(x-2)
    end
end

print("Hello, World!")
print(fib(15) == 610)

Performance

Bon uses LLVM to generate efficient machine code, either JIT compiled, or pre-compiled to a binary.

This, along with zero-cost automatic memory mangement, keeps Bon in same performance ballpark as C++. For specific examples, see Benchmarks.

Safety

Performance doesn't have to come at the expense of safety, and safety doesn't have to come at the expense of simplicity. Bon has a powerful static type system which allows for simplifying code with type inference and pattern matching. In addition, Bon allows you to easily define custom behaviors for scenarios such as out-of-bounds memory accesses per type.

Learn more in the documentation

Why another programming language?

Bon is being designed as a programming language built around all of the things that make me enjoy programming, and it's dedicated to the memory of my mother. Her name was Bonnie, but everyone called her Bon, so that is where the name comes from. More information is available on my patreon page: https://www.patreon.com/d_p_gonz