C99 teaches you to notice layout, lifetime, pointer ownership, and linker boundaries before you trust an abstraction. Bring that suspicion to Musi, but let the source name more of the contract: imports replace header folklore, data variants replace tag comments, Option replaces null sentinels, and effects/foreign declarations mark work that leaves ordinary evaluation.
Use this guide as a translation journal for C99 code. Start with the familiar habit, then ask which Musi construct owns the same promise. A page is successful when it tells you which old instinct to keep and which old shortcut to drop.
Start from the habit that hurts
- Values, Functions, and Expressions - values habits get translated once, then the Musi Book owns the details.
- Blocks and Control Flow - blocks habits get translated once, then the Musi Book owns the details.
- Variables and Mutation - mutation habits get translated once, then the Musi Book owns the details.
- Structs, Classes, and Records - records habits get translated once, then the Musi Book owns the details.
- Arrays, Pointers, and Slices - arrays habits get translated once, then the Musi Book owns the details.
- Null, Option, and Result - absence and failure stop being side channels.
- Errors, Results, and Effects - outside work becomes a named request.
- Enums, Variants, and Patterns - patterns habits get translated once, then the Musi Book owns the details.
- Macros, Generics, Classes, and Laws - generics habits get translated once, then the Musi Book owns the details.
- Methods and Receiver Calls - calls habits get translated once, then the Musi Book owns the details.
- Headers, Modules, and Packages - package boundaries replace compatibility-era habits.
- Testing and Tooling - testing habits get translated once, then the Musi Book owns the details.
- Unsafe, FFI, and Native Boundaries - native edges stay narrow enough to audit.
Habits that still help
- Keep the C habit of asking where memory, symbols, and failures come from.
- Drop the habit of encoding meaning in integer flags, comments, or pointer conventions when Musi has a type for that meaning.
- Keep examples tied to ordinary work: receipts, routes, files, animals, people, rooms, and services.
First false friend
Musi class is not a C struct with function pointers; records/data carry shape, classes name behavior a type can provide. If you need a person, car, invoice, or package, start with records or data. If you need any type that can compare, show, encode, or step, use a class with instances.
When to switch to the Musi Book
Stay in this guide while a C99 habit is getting in the way. Switch to Values and let, Records, Patterns, Generics, Classes, and Effects when you need the source-of-truth rule.