Skip to content
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

Add record function tag definition #11

Closed
wants to merge 5 commits into from
Closed

Conversation

mguetschow
Copy link
Collaborator

As discussed on the mailing list and the last interim.

I've also added example usage of the record function as an alternative for the first example. The second example would probably also benefit from it, but it might also make the example even harder to understand?

draft-ietf-cbor-packed.md Outdated Show resolved Hide resolved
draft-ietf-cbor-packed.md Outdated Show resolved Hide resolved
draft-ietf-cbor-packed.md Outdated Show resolved Hide resolved
draft-ietf-cbor-packed.md Outdated Show resolved Hide resolved
with equal position in the provided arrays into pairs that constitute the resulting map.

If the matching value item for a given key item is either >undefined< (simple value 23)
or does not exist (because the value item array is shorter than the key item array),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, maybe there is no resulting pair if the value doesn't exist?
Maybe we can factor absence and "undefined" together, as in "in the value array, items of value "undefined" are treated as absent"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about

The value item array may be shorter than the key item array, in which case one or more value items towards the end are absent.
Additionally, value items that are undefined (0xf7) are treated as absent.
Key items whose matching value items are absent are not included in the resulting map.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I put in a slightly edited version of this.

We don't say yet what happpens if the value item array is longer than the key item array.
Should this be a "MUST NOT"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I put in a slightly edited version of this.

Reads good to me, thanks!

We don't say yet what happens if the value item array is longer than the key item array.
Should this be a "MUST NOT"?

Yes, I would say so.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I pushed this MUST NOT directly to main, as the merge is now confused...
0b4dbfa

@cabo
Copy link
Contributor

cabo commented Feb 26, 2024

Sorry, messed up the merge.

@cabo
Copy link
Contributor

cabo commented Feb 26, 2024

Closing this branch -- the actual state is in function-tag-record-fixed.

@cabo cabo closed this Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants