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

Advanced conversion operations #21

Open
sharkdp opened this issue Sep 13, 2022 · 3 comments
Open

Advanced conversion operations #21

sharkdp opened this issue Sep 13, 2022 · 3 comments
Milestone

Comments

@sharkdp
Copy link
Owner

sharkdp commented Sep 13, 2022

users might also like to explicitly convert to:

  • a base SI representation, like kg m³ / s², e.g. expr -> base
  • a shortest-possible representation, e.g. J·m e.g. expr -> shortest
  • to the canonical representation (see also Canonical unit for dimension #3), e.g. expr -> canonical

Do we also need/want to allow for conversions to dimensions? is something like expr -> Energy useful? Users could always add type annotations, i.e. use sth like expr: Energy to make sure that something is an energy.

see #3 for implicit conversions

@sharkdp sharkdp modified the milestone: public release Jul 10, 2023
@sharkdp
Copy link
Owner Author

sharkdp commented Jul 12, 2023

Maybe we should not use the -> … syntax for this, but rather make use of the postfix apply operator: expr // to_base

@sharkdp
Copy link
Owner Author

sharkdp commented Jul 19, 2023

See also: #116

@sharkdp sharkdp added this to the 1.9 milestone Nov 23, 2023
@sharkdp
Copy link
Owner Author

sharkdp commented Feb 22, 2024

See also: #373 305

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant