Overview

Map Go 1.26.2 habits to the Musi Book without repeating every construct example.

Go rewards small packages, plain structs, explicit errors, interfaces by behavior, and concurrency that stays close to call sites. Musi keeps direct naming, but moves more facts into declarations: Option for absence, data for variants, classes/instances for shared behavior, and effects for operations that ask the outside world.

Use this guide as a translation journal for Go 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

Habits that still help

  • Keep the Go habit of writing the small thing first and naming package boundaries clearly.
  • Drop nil and second-return conventions when Musi can put the branch in the type.
  • Keep examples tied to ordinary work: receipts, routes, files, animals, people, rooms, and services.

First false friend

Musi class is closer to an explicit interface constraint with instances; it is not a struct and not a method set attached by package convention. 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 Go 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.