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

Equivalence principle #6

Merged
merged 5 commits into from Jan 23, 2023
Merged

Equivalence principle #6

merged 5 commits into from Jan 23, 2023

Conversation

cabo
Copy link
Contributor

@cabo cabo commented Jul 20, 2022

Describe the equivalence principle, and claim it for reference tags.

Add a default "join" function for array/string combinations.

@cabo cabo requested a review from chrysn July 20, 2022 21:06
@chrysn
Copy link
Member

chrysn commented Jul 21, 2022

If there is an implicit join, does it even still need its own tag?

Ad equivalence: If we go with this, we might not manage to close that box again, and tags could let themselves in to a lot of places.

I think it's good to describe the principle, but also caution that it's still up to the CBOR protocol to decide which equivalences may be used in which places, going from an HTML style free-for-all (document authors are advised to keep compatibility in mind or rely on graceful fallback) to the-CDDL-is-the-law cases (maybe around COSE).

Speaking of CDDL: How would that equivalence be described on that side? Sure a protcol designer can already say item = integer / #6, but should there be a control for equivalence like item = integer .or-equivalent "any" or item = integer .or-equivalent [2, 3]? (where 2 and 3 might be explicitly admitted tags, ignoring the fact that integer already does include these from the onset).

@cabo
Copy link
Contributor Author

cabo commented Jul 21, 2022

If there is an implicit join, does it even still need its own tag?

Yes, because the implicit join only works for strings (and arrays of strings).

@cabo
Copy link
Contributor Author

cabo commented Jul 24, 2022

I added some more text about limitations and usage considerations of the tag equivalence concept.
I think this should be published as a -07 to get discussion going before the IETF 114 CBOR meeting.

@cabo cabo merged commit d10ef9b into main Jan 23, 2023
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.

None yet

2 participants