C++17 builds large systems from value types, RAII, templates, overloads, exceptions, and carefully hidden resource edges. Musi keeps the taste for named operations and static promises, but separates stored shape from behavior contracts: records/data describe things, classes describe operations, effects and foreign declarations mark boundary work.
Use this guide as a translation journal for C++17 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.
- Templates, Concepts, 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 which operation is generic and which value owns shape.
- Drop inheritance-first and overload-first reflexes when a record, data variant, or explicit instance says the same thing plainly.
- Keep examples tied to ordinary work: receipts, routes, files, animals, people, rooms, and services.
First false friend
Musi class is closer to a concept or trait than a C++ class; records/data store shape, instances satisfy behavior. 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 C++17 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.