Questions about Span range and arithmetic #536
-
|
for
(also opened a PR to improve a comment that got me super confused on first look #535) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
The ranges of types (not just That's a very vague answer, my apologies. The range I chose for Jiff was based on dates: a What this comes down to is: why do you need to represent such a long span of time in calendar units specifically? You might be able to just return an error. That's the intent anyway. If you do really need to represent a span of time in calendar units of that size, then you likely have a very specialized and niche use case where Jiff might not be a good fit. |
Beta Was this translation helpful? Give feedback.
The ranges of types (not just
Spanbut alsocivil::DateandTimestamp) are indeed not the same as Temporal and this was intentional. It's a source of tension, but the fundamental issue is that Temporal's range is quite large and this in turn requires larger primitive representation. This is somewhat easier in the context of the JavaScript ecosystem because of its garbage collection and extreme sophistication for keeping common cases off the heap and putting less common cases on the heap. Rust can broadly do similarish things, but there's no real garbage collector that Jiff can realistically use.That's a very vague answer, my apologies.
The range I chose for Jiff was based on dates: a
civ…