Osprey Language Specification
Author: Christian Findlay
Table of Contents
- Introduction
- Lexical Structure
- Syntax
- Type System
- Function Calls
- String Interpolation [STRING-INTERPOLATION]
- Pattern Matching
- Block Expressions
- Boolean Operations
- Iterators and Iteration
- Fibers and Concurrency
- Built-in Functions
- Error Handling
- HTTP
- WebSockets
- Security and Sandboxing
- Algebraic Effects
- Memory Management
- Foreign Function Interface
- Language Server & Editor Integrations
- Debugger
- WebAssembly Target [WASM-TARGET]
- Language Flavors
- ML Flavor Syntax
- Modules and Namespaces
- Documentation Comments
- Testing Framework
- CPU Profiler
- Osprey Package Registry and Manager
- Package Registry Trust and Discovery
- Package Domain Model
- Package Evidence and Fair Discovery
- Osprey GitHub Action [GHA]
About This Specification
This specification defines the complete syntax and semantics of the Osprey programming language. Each section is available as a separate page for easy navigation and reference.
The Osprey language is designed for elegance, safety, and performance, emphasizing:
- Typed algebraic effects with lexical handlers; complete static coverage checking remains in progress
- Named arguments for multi-parameter functions to improve readability
- Strong type inference (Hindley-Milner) to reduce boilerplate while maintaining safety
- String interpolation for convenient text formatting
- Pattern matching for elegant conditional logic
- Immutable-by-default variables and persistent collections
- Fast HTTP/HTTPS servers and clients with built-in streaming support
- C interoperability via a typed foreign function interface
Implementation Status
🚧 NOTE: The Osprey language and compiler are actively under development. This specification represents the design goals and planned features. Please refer to individual sections for current implementation status.