-
-
Notifications
You must be signed in to change notification settings - Fork 281
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
Breaking change wish-list #650
Comments
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Regardless of the specific format chosen, a breaking change I would really like is for the The current default |
Removing the defaults is almost certainly not going to happen. ISO 8601 is at least a possibility, though keeping the non-human-readable compatibility will almost certainly happen.
That's pretty much the point, actually. It's meant for when someone wants to serialize it for storage/transmission and then deserialize it at the other end. It is not and was never intended to be general-purpose — that's what the attributes are for. |
I don't really mind the non-human readable variant, since as far as I know there is no widely used binary encoding standard for dates and times. But I think replacing the default human readable representation with a standardized one has only benefits: it avoids the work of maintaining an extra format and interop with other systems is easier out of the box. |
For what it's worth, "maintaining" the extra format is essentially zero work, as it was a one-off thing that hasn't changed in the slightest. Changing it to a different format wouldn't be much work, and looking at the current implementation it's not even that different from ISO 8601. |
Note: There is no breaking change current planned. This issue is to keep track of things that may happen when there is a breaking change at some undetermined point in the future. Items are in no particular order.
Potential changes
These are mostly things that I have thought about at some point, with varying levels of certainty.
large-dates
feature flag. Support the ±999,999 range of years unconditionally, adding a modifier to the[year]
component to solve the issue of ambiguity.serde-well-known
feature flag, which is already deprecated in favor of using the relevant flags (serde
,formatting
, and/orparsing
) directly.FormatItem
opaque and requireFormatItem::Literal
to be valid UTF-8. Likewise forOwnedFormatItem
.Copy
implementation forParsed
.Duration
toSignedDuration
or something else.Duration::seconds
generic overi64
,f32
, andf64
. Similarly forsaturaturating_seconds_*
andchecked_seconds_*
. Alternatively, have aseconds_float
method that is generic while keeping the integer case separate.Duration::time_fn
. This is a carry-over fromtime
0.1 and was presumably meant as a poor man's benchmarking tool.Instant
is not meant to be used in that manner.time::Instant
in favor of an extension trait onstd::time::Instant
. This would reduce the number of trait implementations needed. The extension trait was added in v0.3.35, withtime::Instant
being deprecated at the same time.[optional]
and[first]
(needed for How to disableoptional
for formatting #708)The text was updated successfully, but these errors were encountered: