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

Make all struct variables optional #20

Open
JonathanMace opened this issue Feb 10, 2017 · 2 comments
Open

Make all struct variables optional #20

JonathanMace opened this issue Feb 10, 2017 · 2 comments

Comments

@JonathanMace
Copy link
Member

All variables should be optional in a struct

@JonathanMace
Copy link
Member Author

Also add 'one of' to structs

@JonathanMace
Copy link
Member Author

To enable structs to have optional values, and still be lexicographically comparable, 'not present' is lexicographically less than 'any value'; the optional flag must therefore precede each variable as opposed to a single block of flags at the start of the struct.

This would be quite expensive as it entails an extra byte per field.

Ideally, we'd have really nice encoding that figures this out. But we don't. Do this at some point.

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