Osprey Language Specification

Version: 0.2.0-alpha
Date: 2025-07-06
Author: Christian Findlay

Table of Contents #

  1. Introduction
  2. Lexical Structure
  3. Syntax
  4. Semantics
  5. Type System
  6. Function Calls
  7. String Interpolation
  8. Pattern Matching
  9. Block Expressions
  10. Boolean Operations
  11. Loop Constructs and Functional Iterators
  12. Lightweight Fibers and Concurrency
  13. Built-in Functions
  14. Error Handling
  15. HTTP
  16. WebSocket Functions
  17. Security and Sandboxing
  18. Algebraic Effects

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:

  • Named arguments for multi-parameter functions to improve readability
  • Strong type inference to reduce boilerplate while maintaining safety
  • String interpolation for convenient text formatting
  • Pattern matching for elegant conditional logic
  • Immutable-by-default variables with explicit mutability
  • Fast HTTP servers and clients with built-in streaming support
  • WebSocket support for real-time two-way communication

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.