Osprey Language Specification

Version: 0.2.0
Date: 2026-06-19
Author: Christian Findlay

Table of Contents

  1. Introduction
  2. Lexical Structure
  3. Syntax
  4. Type System
  5. Function Calls
  6. String Interpolation
  7. Pattern Matching
  8. Block Expressions
  9. Boolean Operations
  10. Iterators and Iteration
  11. Fibers and Concurrency
  12. Built-in Functions
  13. Error Handling
  14. HTTP
  15. WebSockets
  16. Security and Sandboxing
  17. Algebraic Effects
  18. Memory Management
  19. Foreign Function Interface
  20. Language Server & Editor Integrations

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:

  • Algebraic effects with compile-time safety — unhandled effects are compilation errors
  • 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.