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

Detect special type cases in python deserialisation #1483

Open
aborgna-q opened this issue Aug 29, 2024 · 2 comments
Open

Detect special type cases in python deserialisation #1483

aborgna-q opened this issue Aug 29, 2024 · 2 comments
Labels
enhancement New feature or request python Pull requests that update Python code

Comments

@aborgna-q
Copy link
Collaborator

aborgna-q commented Aug 29, 2024

Convert Sums into UnitSum / Tuple / Option / Result as appropriate.

Auto detection on round trip was left as a todo/future consideration because it also has implications how how we treat implementer of AsExtOp. Said operations would also have to register themselves with deserialization. Probably worth making an issue about this to discuss.

Originally posted by @ss2165 in #1481 (comment)

@aborgna-q aborgna-q added enhancement New feature or request python Pull requests that update Python code labels Aug 29, 2024
@ss2165
Copy link
Member

ss2165 commented Aug 29, 2024

A related problem is when different instances are equivalent in internal representation. I.e. if a user specified a Result<T, ()> should a roundtrip happily turn that in to Option<T>? Not ideal.

@aborgna-q
Copy link
Collaborator Author

Not ideal, but it's unavoidable unless we want to encode every different specialisation as serialisation variants.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request python Pull requests that update Python code
Projects
None yet
Development

No branches or pull requests

2 participants