What's missing
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.
Plan: docs/roadmap-semantic-domains.md L132-L148
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.
- Tests in
Semantics.Test.
Dependencies
None.
What's missing
Phase 3 of the semantic-domains roadmap proposes a
Semantics.Moneypackage. None of it exists: there is no project, noCurrencyorMoneytype, and no ISO 4217 table.Plan:
docs/roadmap-semantic-domains.mdL132-L148The 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
decimalUSD amount to adecimalEUR 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
Semantics.Moneyproject 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, withParse/TryParse/ToString.Money: immutable, adecimalamount plus a currency.ExchangeRateconversion type with no rate sourcing.Semantics.Test.Dependencies
None.