You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
No Money/Currency types: add Semantics.Money (ISO 4217 Currency, Money that refuses cross-currency arithmetic, allocation without lost pennies) #367
Phase 3 of the semantic-domains roadmap proposes a Semantics.Money package. None of it exists: there is no project, no Currency or Money type, and no ISO 4217 table.
Currency (ISO 4217), Money (decimal amount + currency), arithmetic that refuses cross-currency add/subtract at compile or runtime, rounding policies, allocation/splitting without losing pennies, formatting per culture.
Explicitly not part of the quantity generator — currency isn't convertible by a fixed constant. Document why (mirrors the log-scale "doesn't obey linear arithmetic" carve-out).
FX/exchange-rate handling ... Recommend a minimal ExchangeRate type, no rate sourcing.
The roadmap describes itself as a proposal rather than a commitment, so whether this is still wanted is your call. Phase 0 identifiers, Phase 1 music analysis and Phase 2 Color have all shipped. The roadmap marks Phase 3 as depending on nothing.
Why it matters
The roadmap calls money "the canonical 'primitive obsession' target and the clearest showcase of the semantic-type thesis after strings". Today a consumer who adds a decimal USD amount to a decimal EUR amount gets a number back with no error. A consumer who splits 100.00 three ways with plain division gets 33.33 × 3 = 99.99 and loses a cent.
Decision to confirm first
Open question 3 (L230) asks whether money stays outside the quantity model. The roadmap recommends keeping it out.
Acceptance criteria
A new Semantics.Money project that follows the repo's one-package-per-domain layout, with the same target matrix as Strings/Music unless generic math is needed.
Currency: ISO 4217 code plus minor-unit digits, with Parse/TryParse/ToString.
Money: immutable, a decimal amount plus a currency.
Adding or subtracting two different currencies throws, or does not compile.
Allocation and splitting keep the total exact; for example, 100.00 split three ways gives 33.34 / 33.33 / 33.33.
An explicit rounding policy and culture-aware formatting.
Optionally, a minimal ExchangeRate conversion type with no rate sourcing.
Documentation of why Money is not a generated quantity.
Priority: Low. This is a new package from a roadmap that describes itself as a proposal. Nothing is broken, and nothing depends on it.
Area: a new Semantics.Money project, kept outside the quantity generator as the roadmap recommends. Suggested owner: @matt-edmondson. Confirm roadmap open question 3 (whether money stays outside the quantity model) before starting.
Activity
matt-edmondson commentedon Oct 5, 2026
Triage
Semantics.Money)Semantics.Moneyproject, kept outside the quantity generator as the roadmap recommends. Suggested owner: @matt-edmondson. Confirm roadmap open question 3 (whether money stays outside the quantity model) before starting.Generated by Claude Code