Skip to content

Consider un-deprecating the Hijri and Chinese calendar aliases or making them newtypes #6963

@sffc

Description

@sffc

We have a lot of type aliases in ICU4X.

Why should we mark the new type aliases (which were previously their own structs) as deprecated? Why not just embrace that they each represent their own CLDR calendar?

https://github.com/unicode-org/icu4x/blob/main/components/calendar/src/cal/mod.rs

Alternatively, I would maybe be slightly more comfortable if we made them newtypes with a private inner field, so that we can change the implementations again in the future. It means that we'd need to delegate a bunch of trait impls, which is annoying, but that's just how Rust works. On the bright side, it would resolve issues where we have bespoke ICU4X functionality that we don't want on the public trait, like CalendarAlgorithm (#6960) and reference year (#6959).

@robertbastian @Manishearth

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-calendarComponent: CalendarsdiscussDiscuss at a future ICU4X-SC meeting

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions