Rename Dynamics, expand the prelude #20

Closed
opened 2026-09-30 12:48:49 -04:00 by connor · 1 comment
Owner

The user-facing type should be Dynamics and the trait should carry the longer name. Proposed:

  • enum DynamicsSpec -> Dynamics
  • trait Dynamics -> DynamicsModel
  • model structs move under dynamics::models::

Prelude glob-exports the enum's variants (pub use Dynamics::*) so a script writes TwoBody { mu } rather than DynamicsSpec::TwoBody { mu }.

Note the variants then occupy names like Gravity and Drag in any module that imports the prelude.

The user-facing type should be `Dynamics` and the trait should carry the longer name. Proposed: - enum `DynamicsSpec` -> `Dynamics` - trait `Dynamics` -> `DynamicsModel` - model structs move under `dynamics::models::` Prelude glob-exports the enum's variants (`pub use Dynamics::*`) so a script writes `TwoBody { mu }` rather than `DynamicsSpec::TwoBody { mu }`. Note the variants then occupy names like `Gravity` and `Drag` in any module that imports the prelude.
connor added this to the M1 milestone 2026-09-30 12:48:49 -04:00
connor added the size/S label 2026-09-30 12:48:49 -04:00
Author
Owner

Done in 77a1539. The trait is DynamicsModel, the enum is Dynamics, models live in dynamics::models, and the prelude glob-exports the variants.

Done in 77a1539. The trait is `DynamicsModel`, the enum is `Dynamics`, models live in `dynamics::models`, and the prelude glob-exports the variants.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: connor/astrokit#20