Pudu programming language
Menu

Pre-releasePudu 0.1.0 is out

Programs that say what they do.

Pudu is a statically typed language where a signature tells you what a function takes, what it gives back, whether it can fail, and whether it changes what it was given.

Start learningDownload 0.1.0

Search the API

Find any public function, type, trait, constructor, or constant by name or by type.

Try checksum, Str -> UInt32, Result, server

Start with a shape

Search by what a function takes and gives back. Try Result[T, E], &mut T, Array[T] -> T, server, or json.

fn find[T](items: &Array[T], keep: fn(T) -> Bool) -> Option[T]

Browse modules

Pudu 0.1.0

View all modules

Start here

Write a complete program

A Pudu program names its module, imports what it uses, and returns a status from main.

Read the documentationBrowse the complete API

module Hello

import Std.Io as Io

fn main() -> Int {
  let _written = Io.writeLine("Hello from Pudu!")
  0
}

Understand what the code promises

Pudu keeps important choices visible in function signatures and at the place where a value is used.

Typed results

Result[Value, Problem] tells the caller that work may fail. The caller handles both paths.

Explicit references

&T borrows a value for reading. &mut T asks for the exclusive right to change it, written where the call is made.

Checked patterns

match lists the shapes a value may have, so each case can be handled directly.

The library is already there

The standard library ships inside the archive. There is nothing to add to a manifest before a program can read a file, answer a request, or talk to a database.

Services

HTTP clients and servers, TLS that verifies its chain and hostname, sockets, and routing.

Data

JSON, CSV, TOML, YAML and XML, with readers that hold a flat memory peak as a file grows.

Storage

SQLite, and PostgreSQL over its own wire protocol with parameters bound rather than pasted.

Work

Workers, bounded channels, locks, and a testing module with property checks.

Browse all 173 modulesDownload Pudu 0.1.0