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

Proposal for Compact Decimal Types #5835

Open
younies opened this issue Nov 18, 2024 · 1 comment
Open

Proposal for Compact Decimal Types #5835

younies opened this issue Nov 18, 2024 · 1 comment
Assignees
Labels
C-numbers Component: Numbers, units, currencies

Comments

@younies
Copy link
Member

younies commented Nov 18, 2024

Description

Instead of having a single compact implementation that uses SignedFixedDecimal, we propose introducing two separate types:

  • UnsignedCompactDecimal
  • SignedCompactDecimal

Benefits

  • Type Safety: Clearly distinguishing between signed and unsigned types can help prevent runtime errors.
@younies younies self-assigned this Nov 18, 2024
@younies younies added the C-numbers Component: Numbers, units, currencies label Nov 18, 2024
@sffc
Copy link
Member

sffc commented Nov 19, 2024

How do you envision the nesting?

Should it be:

  1. Compact<Signed<Decimal>>
  2. Signed<Compact<Decimal>>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-numbers Component: Numbers, units, currencies
Projects
None yet
Development

No branches or pull requests

2 participants