Welcome to Dryft
Dryft is an experimental stack-based concatenative programming language that brings together elegant syntax, memory safety, and functional programming principles.Key Features
Simple Syntax
Concatenative syntax eliminates brackets and operator precedence rules, making code natural to read and write
Pure/Impure Distinction
Separate
fun (pure functions) from act (actions with side effects) for better code organization and safetyLinear Types
Stack-based resource management ensures memory safety without garbage collection
Type Inference
Full optional type inference lets you write clean code while maintaining type safety
Why Concatenative?
Concatenative languages excel at expressing data transformations naturally. Compare these approaches: Nested functions (hard to read):Functions vs Actions
Dryft distinguishes between pure logic and stateful operations:Pure functions (
fun) contain only logic and can be optimized, memoized, and evaluated at compile time. Actions (act) can perform I/O and side effects but cannot be called from pure functions.Control Flow
Dryft provides three simple control structures that replace all traditional control flow:Conditionals with then
Multiple Conditions with when
Loops with cycle
Quick Example
Here’s a complete FizzBuzz implementation showcasing Dryft’s features:Get Started
Installation
Install the Dryft compiler and set up your development environment
Quick Start
Write your first Dryft program in minutes
Language Guide
Learn Dryft’s syntax, types, and control structures
Examples
Explore example programs and common patterns
Project Information
- Current Version: 0.6.0
- License: GNU General Public License v3.0
- Compiler: Written in Rust
- Backends: C99 (via GCC) and x86-64 assembly (via NASM)