Skip to content

Latest commit

 

History

History
51 lines (41 loc) · 3.16 KB

File metadata and controls

51 lines (41 loc) · 3.16 KB

Goop language tutorial

A step-by-step introduction to Goop. Each chapter links to runnable examples checked by CI (goop check).

Chapter Topic Example
1. Getting started Build, check, first program, REPL, show Go hello.goop, gallery
2. Types and patterns ADTs, match, branded IDs shapes.goop
3. Errors and effects result, failwith, effect handlers result.goop, effects.goop, exceptions.goop
4. Go / C interop import go, @[go], @[c] extern_demo.goop, cgo_demo.goop, gallery
5. Concurrency go, chan, ref, race checks concurrency.goop, race_detection.goop
6. Safety checks Exhaustiveness, branding, refinements branded_ids.goop, trading_order.goop
7. Arrays and loops Array.make, for/while, begin/end arrays.goop, trading_decision_lut.goop
8. Maps map[K] V, Map.* maps.goop

Prerequisites

Try online: Playground

# Install release binary, or build from source:
curl -fsSL https://raw.githubusercontent.com/Macho0x/Goop/main/scripts/install.sh | bash
# — or —
cd src && go build -o ../goop ./cmd/goop

goop new hello && cd hello
goop check main.goop

Editor setup

Further reading