Cure: A Dependently-Typed Programming Language for the BEAM Virtual Machine
By
delitrem
Hard crust, hollow middle. Skim only.
Summary
The article introduces Cure, a new strongly-typed, dependently-typed programming language designed for the BEAM virtual machine (Erlang/Elixir ecosystem). It showcases key features including dependent types for compile-time safety guarantees, native finite state machine (FSM) syntax with verified transitions, refinement types for value constraints, and exhaustive pattern matching. The language aims to bring formal verification and type safety to the BEAM environment traditionally known for dynamic typing.
Key quotes
· 4 pulleddef safe_head(v: Vector(T, n)): T when n > 0 = head(v)
fsm TrafficLight do Red --> |timer| Green Green --> |timer| Yellow Yellow --> |timer| Red Green --> |emergency| Red end
def safe_divide(a: Int, b: {x: Int | x != 0}): Int = a / b
Cure: A strongly-typed, dependently-typed programming language for the BEAM with built-in FSMs and SMT verification
You might also wanna read
Dynamic Borrow-Checking in a Toy Programming Language: Implementing Rust-like Memory Safety Without Static Types
This article presents a demonstration of a toy programming language that implements borrow-checking without static type-checking. The langua
C++26 Standard Draft Finalized with Reflection, Memory Safety, Contracts, and New Concurrency Framework
The C++26 standard draft has been completed, introducing major new features including reflection capabilities that allow C++ to describe its
Understanding Fil-C: A Simplified Model of Memory-Safe C/C++ Implementation
The article presents a simplified model of Fil-C, a memory-safe implementation of C/C++. It explains that while the real Fil-C uses a compil
Sky: An Experimental Elm-Inspired Programming Language That Compiles to Go
Sky is an experimental programming language that combines Go's pragmatism with Elm's elegance to create a fullstack functional programming l
Analyzing Rust's Coherence and Orphan Rules: Ecosystem Development Challenges and Proposed Solutions
This article critiques Rust programming language's coherence rules and orphan rules, which prevent implementing traits for types defined in
SBCL Fibers: Implementation Design for Lightweight Cooperative Threads
This is a draft design document describing the implementation of lightweight userland cooperative threads (called 'fibers') for SBCL (Steel
