Open almann opened 1 year ago
Current thinking of how we might revise this:
Hi all, i think the short-form timestamps occupied too many opcodes (0x80-0x8C), and some of which are not very useful in most commonly use cases (e.g. 80, 81, 83, 86, 87, 88, 8b, 8c). (sorry if I'm wrong.)
Edit: maybe we could optimize (by using short-form encoding) for most commonly use cases only, where Year+Month+Day always stand together, and Hour+Minute+Second always stand together too. And leave others to Long-form timestamps.
Based on our experience, interactions with Ion users, and data about current use cases, we designed the short-form timestamps to cover the most common precisions and the UTC offsets for all known timezones. We expect that usage of the long-form timestamp encoding will be rare, and thus will not benefit form additional op codes.
@liigo, do you have a specific case of long-form timestamps that you believe would benefit from having a separate op code?
@popematt No. I thoutht long-form timestamps encoding (op F8) can contains everything of any timestamp. (maybe I'm wrong)
This is currently fairly confusing, we should rework this section.
_Originally posted by @almann in https://github.com/amazon-ion/ion-docs/pull/215#discussion_r1195614957_