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

Avoid names which differ only by T #86

Open
chiphogg opened this issue Feb 6, 2023 · 0 comments
Open

Avoid names which differ only by T #86

chiphogg opened this issue Feb 6, 2023 · 0 comments
Labels
⬇️ affects: code (interfaces) Affects the way end users will interact with the library 📁 kind: cleanup Making the library nicer in some way, without affecting functionality much or at all 💪 effort: medium

Comments

@chiphogg
Copy link
Contributor

chiphogg commented Feb 6, 2023

We strive to be "easy to use correctly; hard to use incorrectly".

Right now, one significant way the library is "easy to use incorrectly" is to do with very different type names that differ only by T. Examples:

  • UnitProductT and UnitProduct.
    • The former accepts any units in any order. The latter has strict rules for ordering and should only ever be auto-generated.
  • CommonUnitT and CommonUnit
    • Same considerations as above.

For UnitProduct, I could see using something like CompoundUnit. I don't have any good ideas for an alternative name for CommonUnit.

@chiphogg chiphogg added the 📁 kind: cleanup Making the library nicer in some way, without affecting functionality much or at all label Feb 6, 2023
@chiphogg chiphogg added ⬇️ affects: code (interfaces) Affects the way end users will interact with the library 💪 effort: medium labels Mar 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⬇️ affects: code (interfaces) Affects the way end users will interact with the library 📁 kind: cleanup Making the library nicer in some way, without affecting functionality much or at all 💪 effort: medium
Projects
None yet
Development

No branches or pull requests

1 participant