-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationpkg:dim-sidim-si packagedim-si package
Description
The dim-si README has a few gaps that new users hit early.
The Quick Start should be the primary onboarding path. Rather than adding separate sections for each concept, expand the Quick Start to demonstrate more operations (multiplication, division, scaling) using the fluent q() API — that's the style we want users to reach for first. Free functions get a brief mention, not a full code block.
Quick Start structure
Walk through a small coherent scenario rather than isolated snippets:
- Create quantities from values — show
kilometer(100),hour(2), etc. and call out that this is how you wrap raw numbers (e.g., from JSON or external APIs) - Compute — use
q()fluent API to combine them: division for speed, addition with mixed units - Extract values — show
.in(unit)to get plain numbers back out, explainvalueInas the non-fluent alternative - Compile-time safety — show a dimension mismatch error
- Affine units — brief temperature example since it has different semantics
Free functions get a one-liner mention at the end.
README section order
- Installation
- Quick Start (above)
- Type Annotations — how to write functions with
Linear/Affine(see Make dim-si types easy to use for end users #7) - Units (reference table)
- Custom Scaled Units
- Adding a New Unit (contributor-facing)
Other improvements
- Ensure import consistency (everything comes from
@isentropic/dim-sisubpaths, not lower-level packages)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationpkg:dim-sidim-si packagedim-si package