Typed results
Result[Value, Problem] tells the caller that work may fail. The caller handles both paths.
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.
Find any public function, type, trait, constructor, or constant by name or by type.
Try checksum, Str -> UInt32, Result, server
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]A Pudu program names its module, imports what it uses, and returns a status from main.
module Hello
import Std.Io as Io
fn main() -> Int {
let _written = Io.writeLine("Hello from Pudu!")
0
}Pudu keeps important choices visible in function signatures and at the place where a value is used.
Result[Value, Problem] tells the caller that work may fail. The caller handles both paths.
&T borrows a value for reading. &mut T asks for the exclusive right to change it, written where the call is made.
match lists the shapes a value may have, so each case can be handled directly.
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.
HTTP clients and servers, TLS that verifies its chain and hostname, sockets, and routing.
JSON, CSV, TOML, YAML and XML, with readers that hold a flat memory peak as a file grows.
SQLite, and PostgreSQL over its own wire protocol with parameters bound rather than pasted.
Workers, bounded channels, locks, and a testing module with property checks.