bJou Install Features Learn Blog

Program effectively. Compile quickly. Create fast code.

bJou is a simple systems programming language that focuses on speed and effectiveness in both the process of programming and the generated programs. While the core of the language is relatively simple, bJou allows for limitless power of expressiveness through compile-time metaprogramming. Try it out and learn more.

using import "compiler.bjou"

# run this at compile time
\static_do {
    # create the AST
    message := bjou_createStringLiteral("Hello, world!\n")
    args    := bjou_createArgList(&message, 1)
    ident   := bjou_createIdentifier("printf")
    call    := bjou_createCallExpression(ident, args)

    # register symbols
    bjou_addSymbols(call, bjou_getGlobalScope())

    # add to our program
    bjou_appendNode(call)
}
Building "Hello, world!" at compile time