An experimental programming language
Dovetail
A language for business logic.
Dovetail has records, enums, newtypes, typed errors, and structured concurrency. Programs compile to WebAssembly.
The compiler and libraries are in early development.
A small example
Quantity.dovenewtype Quantity private = Int32
module Quantity =
public function make(value: Int32)
: Result<Quantity, String> =
if value > 0 then
Ok(Quantity(value))
else
Error("Must be positive")Here, construction is private. The make function checks the value and returns a typed result.
Try it
curl -fsSL https://dovetaillang.org/install.sh | shFor macOS and Linux. See the getting started guide for Windows and PATH setup.
Documentation
All chapters- Getting started
- Installation, editor setup, and a first program.
- The language
- Syntax, types, functions, and error handling.
- Domain modeling
- Value objects, entities, and application boundaries.
- Async and resources
- Running work and managing its lifetime.
For coding assistants, the same book is available as Markdown.