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

Physical quantities should exist in a separate namespace than units #12

Closed
whitequark opened this issue Dec 6, 2016 · 2 comments · Fixed by #125
Closed

Physical quantities should exist in a separate namespace than units #12

whitequark opened this issue Dec 6, 2016 · 2 comments · Fixed by #125
Labels
core For issues related to core Rink functionality enhancement

Comments

@whitequark
Copy link
Contributor

> air density
air: Average molecular weight of air. density = 1 kilogram / meter^3
> gold density
gold: density = 1 kilogram / meter^3
> silver density
silver: density = 1 kilogram / meter^3
@tiffany352
Copy link
Owner

Okay, that's pretty bad. It's multiplying air by density to make density amount of air, and density is a physical quantity. The substance printer then prints the amount and uses the quantity name instead of "amount".

The correct query would be using the of operator, but it looks like rink doesn't actually know the density of any of those substances.

I need to make physical quantities exist in a separate namespace from regular units. Maybe I could even make it so that multiplying a unit by a quantity works the same as the of operator.

@whitequark whitequark changed the title density properties seem broken Physical quantities should exist in a separate namespace than units Feb 12, 2017
@tiffany352 tiffany352 added core For issues related to core Rink functionality enhancement labels Aug 7, 2020
tiffany352 added a commit that referenced this issue Apr 10, 2022
Makes quantities occupy a different namespace from units. This means you can no longer write them in expressions as though they were units, which was confusing.

Fixes #12, which is one of the longest standing bugs in Rink.
@whitequark
Copy link
Contributor Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core For issues related to core Rink functionality enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants