Open
Description
Discussion: core decimal types
- @sffc Did we want
pub type UnsignedDecimal = WithDecimal<UnsignedInteger>
? Decimal is an Integer with an extra field that specifies the location of the decimal point. - @robertbastian Yes, but it is extra work.
- @sffc Is it breaking to change
pub struct UnsignedDecimal
topub type UnsignedDecimal
? - @robertbastian Maybe, not sure
- @sffc If we keep
fixed_decimal
as a separate non-stable crate, this is fine, because the only thing we format isDecimal
- @sffc Do we want the type wrap to be private?
pub struct Decimal(Signed<UnsignedDecimal>)
- @robertbastian That requires duplicating all the functions or derefing, and removing a deref step seems more semver breaking than the alternative
Proposal:
- Definitely in 2.0:
pub type Decimal = Signed<UnsignedDecimal>
pub struct UnsignedDecimal
- Additional integer renames (see point 3):
pub type Integer = Signed<UnsignedInteger>
pub struct UnsignedInteger
- If
fixed_decimal
remains a util crate, we can do the integer changes post-2.0, which may involve a range dependency fromicu_decimal
tofixed_decimal
. If we merge it intoicu_decimal
, we put the integer types behing an experimental feature. - If we can make
pub type UnsignedDecimal
in 2.x, great, if not, fine, maybe in 3.0
LGTM: @sffc @younies @robertbastian @echeran
Metadata
Metadata
Assignees
Type
Projects
Status
No status