Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Learning Plenty

Plenty combines Python-shaped syntax with explicit types, ownership, and native compilation. The examples are self-contained and teach implemented features.

Start with Setting up to install a release and put plenty on your PATH. Then follow the ten core parts to build a small command-line tool:

  1. Your first program: compile, run, and check.
  2. Values, functions, and control flow: name values, choose types, define functions, and repeat work.
  3. Absence and failure: handle missing values and errors with Option, Result, match, and ?.
  4. Collections, ownership, and borrowing: keep groups of values, transfer ownership, copy, and borrow.
  5. Iteration and transformation: visit values, transform them, and produce them incrementally.
  6. Defining your own data: write records, methods, constructors, and enums.
  7. Heterogeneous collections: combine different kinds of values with enums and anonymous sums.
  8. Special-purpose data structures: choose columnar storage for calculations over selected fields.
  9. Organizing a program: split a program into modules and choose its public interfaces.
  10. Useful programs and resources: use command-line arguments, text, standard streams, and files in a complete application.

Then choose an optional path when your program needs it:

The Reference describes detailed contracts and limits. Use the supplementary examples to look up collection methods, text operations, and advanced file usage.