Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add STANDARD_GRAVITY Constant #348

Merged
merged 10 commits into from
Dec 10, 2024
Merged

Add STANDARD_GRAVITY Constant #348

merged 10 commits into from
Dec 10, 2024

Conversation

chiphogg
Copy link
Contributor

@chiphogg chiphogg commented Dec 8, 2024

It took me a little while to figure out exactly what I wanted to do
here.

Initially, I was going to deprecate the standard gravity unit. Then I
realized we need it to define certain other units, such as the
correspondence between "pounds" as a force and a mass --- and I didn't
want to introduce a circular dependency between :units and
:constants.

Then I was going to deprecate only the quantity maker,
standard_gravity. But then I realized it would be weird to create a
situation where certain units have quantity makers, and certain other
ones don't.

In the end, I think the right move is to just provide standard gravity
as a new constant. This is the preferred way to interact with it, but
the old ways will still be there for the foreseeable future.

Follow-on to #90.

This makes more sense, and the only reason we didn't do it in the first
place is that we hadn't yet invented `Constant` in the library.
@chiphogg chiphogg added release notes: 🗑️ lib (deprecation) PR deprecating library functionality release notes: 📏 lib (new units/constants) PR adding new units or constants to the library labels Dec 8, 2024
@chiphogg chiphogg requested a review from geoffviola December 8, 2024 22:42
@chiphogg chiphogg marked this pull request as draft December 8, 2024 23:07
@chiphogg
Copy link
Contributor Author

chiphogg commented Dec 8, 2024

I should think this through some more.

@chiphogg chiphogg changed the title Deprecate StandardGravity unit, for a constant Add STANDARD_GRAVITY Constant Dec 9, 2024
@chiphogg chiphogg marked this pull request as ready for review December 9, 2024 15:16
@chiphogg chiphogg removed the release notes: 🗑️ lib (deprecation) PR deprecating library functionality label Dec 9, 2024
@chiphogg chiphogg merged commit 1b72b87 into main Dec 10, 2024
13 checks passed
@chiphogg chiphogg deleted the chiphogg/g0#90 branch December 10, 2024 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release notes: 📏 lib (new units/constants) PR adding new units or constants to the library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants