-
Notifications
You must be signed in to change notification settings - Fork 185
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
Bikeshed: What should neo datetime placeholder markers be called #4186
Labels
Milestone
Comments
Discuss with: |
Approach:
Name bikeshed:
Decision: impl<Y: Yokeable> KeyedDataMarker for EmptyMarker<Y> {
const KEY: DataKey = data_key!("_empty", singleton);
}
// on most providers
impl<Y: Yokeable> DataProvider<EmptyMarker<Y>> for Foo {
debug_assert!(false);
return DataError::MissingDataKey.with_key(EmptyMarker<Y>::KEY);
}
// Check for the EmptyMarker before calling .load()
// this should be a convenience method on EmptyMarker
if core::any::TypeId::of::<M>() == core::any::TypeId::of::<EmptyMarker<M::Yokeable>>() {
// skip loading
} Discussion:
Agreed: @Manishearth @robertbastian @sffc |
I need this for skeleta, so I am taking it now |
Since the key fails to load, instead of EmptyMarker, wdyt of NeverMarker? |
works! |
Merged
sffc
added a commit
that referenced
this issue
Mar 12, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Part of #3865
From #4185
We have an opportunity to reduce data size for calendars that don't need, say, day symbols data (or numeric month formatting data). For generic and AnyCalendar formatting to work, however, we need to be able to abstract over calendars that both have and don't have this data alike. Ideally we can do something like
type DaySymbols = ()
, however this causes trouble when we attempt to abstract over this with traits since you can't easily do "or" bounds with traits (here we need "Yokeable = LinearSymbolsV1
ORSelf = ()
").We should have an always-empty key for this, like
PlaceholderDaySymbolsV1
, which we never attempt to load but exists to satisfy the trait bound.We should figure out what to call it.
(In general I'd like to avoid the term "dummy", it's often considered non-inclusive)
The text was updated successfully, but these errors were encountered: