Calcium Programming Language
Calcium
Note: This project is currently under active development. APIs and syntax may change without notice.
A functional programming language with pipelines, pattern matching, and effect handling
use core.io!;
[1, 2, 3, 4, 5]
|> filter(x => x % 2 == 1)
|> map(x => x * x)
|> reduce((a, b) => a + b, 0)
!> io.println; // 35
Features
- Pipeline Operator (
|>) - Chain function calls in a readable left-to-right style - Effect Pipeline (
!>) - Chain side-effecting functions with automatic result wrapping - Pattern Matching - Powerful
matchexpressions for control flow - First-class Functions - Lambda expressions and closures
- Constraints - Define and enforce value validation rules
- Result Types - Built-in
success(value)andfailure(error)for error handling - Module System - External module support via Boneyard registry
Quick Start
Installation
# Clone the repository
git clone https://github.com/ytnobody/calcium-lang.git
cd calcium-lang/calcium
# Build
go build -o calcium ./cmd/calcium
go build -o bone ./cmd/bone
# Add to PATH (optional)
export PATH=$PATH:$(pwd)
Hello World
use core.io!;
"Hello, Calcium!" !> io.println;
calcium hello.ca
Documentation
- Getting Started - Installation and your first program
- Tutorial - Learn the language step by step
- Modules - Using bone and Boneyard
- Reference - Language specification and standard library