Raven programming language

A fresh language
for .NET.

Expressive functions, explicit data models, and familiar object-oriented programming—with the .NET libraries and tools you already use.

Take the language tour · Preview status and compatibility

  • .NET 10 & 11
  • SDK & templates
  • VS Code
  • Compiler APIs
Explicit states · quote.rvn
import System.Console.*

union Quote {
    case Ready(total: decimal)
    case Rejected(reason: string)
}

func describe(quote: Quote) -> string {
    quote match {
        .Ready(let total) => "Total: $total"
        .Rejected(let reason) => reason
    }
}

WriteLine(describe(.Ready(24.50m)))

Each state carries its own data. Match the outcomes in one expression.

From first look to first program

Start with something that runs.

  1. 1Meet the language

    Read one complete program, then change it in your browser.

  2. 2Install and run

    Download the SDK and run your first file. No source checkout required.

  3. 3Learn the ideas

    Explore functions, records, unions, patterns, and .NET interop.

Already write C#? Start with familiar code, expressed in Raven.

Readable workflows

Make absence and failure explicit.

Optional represents absence; Result carries a success or an error. Propagate with ? when the current operation cannot continue, or use match to handle each case.

Learn Optional and Result

import System.Console.*

func readPort(text: string) -> Optional<int> {
    let port = int.TryParse(text)?
    if port <= 0 || port > 65535 { return .None }
    return .Some(port)
}

WriteLine(readPort("8080"))
WriteLine(readPort("invalid"))

The platform you know

Use ordinary .NET libraries.

Keep using .NET APIs, generic collections, LINQ, NuGet, and MSBuild. Combine that familiar foundation with Raven’s explicit data models and value-based error handling.

Explore .NET interoperability

import System.*
import System.Linq.*
import System.Console.*

let names = ["raven", "dotnet", "hello"]
let titles = names
    .Where(name => name.Length > 4)
    .Select(name => name.ToUpperInvariant())

WriteLine(String.Join(", ", titles))

A complete working environment

Write, run, and understand your code.

Use the same compiler services in your editor and in tools that analyze Raven code.

SDK and templates

Create console apps, libraries, and web projects. Build and run them with rvn.

Install the SDK

VS Code

Completion, diagnostics, hover, navigation, and refactorings while you edit.

Set up the extension

Compiler services

Work with syntax trees, symbols, and semantic models. Extend analysis with analyzers and source generators.

Explore the tools and APIs
Raven in Visual Studio Code: a Quote union and match expression with a symbol hover tooltip, syntax highlighting, and inferred type hints
Raven in VS Code, with symbol hover information and compiler-backed type hints.

Build an application

An ASP.NET Core API, in Raven.

The pet-shelter sample combines routing, OpenAPI, async handlers, and streaming responses with Raven records and unions.

Build the web API
More places to exploreEmbedded IoT and Native AOT
ExperimentalBlazor component macros · evolving syntax and tooling

Related project: neoCLR. Raven currently targets .NET. The neoCLR project is exploring an experimental runtime and native compilation for Raven. That integration is still under development; visit its website for the current scope and progress.

Raven is in preview. Use the release and compatibility guide to distinguish available releases from upcoming language changes.