Skip to content

Welcome to CacaoLang

CacaoLang (Choco) is a modern, expressive programming language designed for ease of use and powerful GUI development.

Features

Simple & Expressive Syntax - Clean, readable code that's easy to learn

Built-in GUI Support - Create desktop applications with GTK4 bindings

Compilation to Native Code - Compile your programs to standalone executables

Rich Standard Library - Extensive built-in functions for common tasks

Interactive REPL - Test code quickly with the interactive shell

Functional Programming - Lambdas, closures, and higher-order functions

Static Typing Optional - Type inference for convenience

Quick Example

// Hello World
print "Hello, CacaoLang!";

// Functions
fn greet(name) {
    return "Hello, #{name}!";
}

print greet("World");

// Lambdas & Higher-Order Functions
let numbers = [1, 2, 3, 4, 5];
let doubled = map(numbers, |x| => { return x * 2; });
print doubled;  // [2, 4, 6, 8, 10]

GUI Example

gui_init("com.chocolang.hello");

let window = gui_window("Hello GUI", 400, 300);
let box = gui_box("vertical", 10);
let label = gui_label("Welcome to CacaoLang!");
let button = gui_button("Click Me");

fn on_click() {
    gui_set_text(label, "Button clicked!");
}

gui_on(button, "clicked", "on_click");
gui_add(box, label);
gui_add(box, button);
gui_add(window, box);
gui_run();

Why CacaoLang?

CacaoLang was created with the philosophy that programming should be enjoyable and accessible. Whether you're building command-line tools, data processing scripts, or desktop applications, CacaoLang provides the tools you need with minimal boilerplate.

Design Goals

  • Readable: Code should read like natural language
  • Productive: Common tasks should be simple
  • Powerful: Advanced features when you need them
  • Cross-platform: Write once, run anywhere

Getting Started

Ready to dive in? Check out our Installation Guide to get CacaoLang up and running, or jump straight to the Quick Start tutorial.

Community & Support


Made by CoffeeShop Development