icu4x icon indicating copy to clipboard operation
icu4x copied to clipboard

Proposal for Compact Decimal Types

Open younies opened this issue 1 year ago • 1 comments

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 avatar Nov 18 '24 23:11 younies

How do you envision the nesting?

Should it be:

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

sffc avatar Nov 19 '24 18:11 sffc

Triage: remains in 2.2 as long as compact decimal is a headline item

Manishearth avatar Dec 19 '25 22:12 Manishearth