A Rust reader brings habits from ownership, enums, traits, Result, modules, pattern matching, and explicit unsafe blocks. That helps with the type that carries the invariant, but the Musi page asks a narrower question: what contract should this local values and calls example make visible?
fn receipt_total(latte_cents: i64, croissant_cents: i64) -> i64 {
latte_cents + croissant_cents
}
let total = receipt_total(450, 120);let receiptTotal (latteCents : Int, croissantCents : Int) : Int :=
latteCents + croissantCents;
let total := receiptTotal(450, 120);
total;Reading Values, Functions, and Final Expressions from Rust
On the Musi side, Musi lets a calculation be a let, a function, or a final expression without wrapping it in an object or framework first. Read the shared example through Rust eyes: keep the useful instinct, then let Musi name shape, behavior, absence, and outside work in separate places.
False friend
Do not preserve call ceremony just because the source language needs it for methods, receivers, overloads, or closures. For a Rust reader, the trap is expecting Musi syntax to mirror Rust even when the ideas are separated differently; Musi class is closest to a Rust trait plus law text; instances play the role of implementations for behavior.
When this pays off
Use this shape when a receipt total, label, distance, or score is pure data moving through named calls. The Rust instinct still helps here: Keep the Rust habit of asking which type carries the invariant.