Experimental documentation — Work in progress
This page has not completed the documentation audit. Current documentation version: experimental.
Standard library
Sagan's core-library plan has three layers:
- Math is built in and automatically available.
- Physics is a tightly integrated, first-party core library requiring an import.
- Rendering is a tightly integrated, first-party core library requiring an import.
Math will provide shared numerical vocabulary. Explicit imports keep physics and rendering from adding dependencies or startup costs to programs that do not need them. The inclusion policy is decided, but concrete APIs, module names, package layout, and implementations are not finalized.
Math: automatically available
Core math will be available without an import. The language already provides checked scalars, vectors, points, spherical forms, and units; the post-1.0 math library will add the carefully designed operations needed by Sagan programs and the other core libraries.
Physics: explicit core library
Physics is a first-party core library, tightly coupled to Sagan's math types and designed for its simulation use cases. Programs must import it explicitly. This keeps the physics runtime and API out of applications that only need math or other lightweight language facilities.
Rendering: explicit core library
Rendering follows the same model as physics: first-party, deeply integrated with Sagan's shared math and simulation vocabulary, and explicitly imported. Programs that do not render should not incur its dependencies or runtime costs.
The exact public APIs, module names, package subdivision, and linking behavior remain to be designed. The inclusion hierarchy itself is settled:
For the first joint implementation, follow the visible two-body orbit roadmap. It separates rendering, physics, math, and language milestones and makes a runnable demo and documentation update part of every step.