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

1112(undefined) may be useful with payload #20

Open
chrysn opened this issue Mar 4, 2024 · 1 comment
Open

1112(undefined) may be useful with payload #20

chrysn opened this issue Mar 4, 2024 · 1 comment

Comments

@chrysn
Copy link
Member

chrysn commented Mar 4, 2024

Processing packed-by-reference#5, I noticed that 1112(undefined) can cause problems:

  • When an application compares unprocessable elements for identity, 1112(undefined) will show up as identical. (Granted, "don't do that, then")
  • If an unpacker has two unpopulated entries in a single dict's keys, and thus produces two 1112(undefined), all of a sudden the dictionary has duplicate keys.
@chrysn
Copy link
Member Author

chrysn commented Mar 4, 2024

Possible mitigation would be to allow decoder defined payload in the 1112 (which would be ignored by the recipient but is stuctured as the decoder needs it), or doing away with 1112 altogether and instead leaving the references as they are (resulting, once more, in a tag that is not processable by the recipient, but it is already a bit disambiguated).

Either of those solves dictionary key issue. The compare-by-identity issue is just mitigated a bit, but not solved for good, because when comparing across positions in different documents, 1112's payload would need to encode everything the decoder knows about the chain of tables that led to this, which is very verbose.

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

No branches or pull requests

1 participant