8000 Add default values to types and codecs · Issue #21 · rixed/dessser · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add default values to types and codecs #21

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

Open
rixed opened this issue Jul 3, 2021 · 1 comment
Open

Add default values to types and codecs #21

rixed opened this issue Jul 3, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request performance

Comments

@rixed
Copy link
Owner
rixed commented Jul 3, 2021

So that we can save space on the wire (for the encodings that allow it).
Also, makes it nicer for manually entered values (such as in JSON)

Actually, not all encoding formats allow this.
RamenRingBuf, for instance, has no way to skip a value, Every non null values are expected to appear in a specific order. For skipping values we would need to adapt the nullbit mask to have one bit per nullable or default-able value. Actually, that would be a presence mask, and nullable values would just have an implicit default to null. Alternatively, we could have an implicit default value for any type, and have one bit per field.

@rixed rixed added enhancement New feature or request performance labels Jul 3, 2021
@rixed rixed self-assigned this Jul 23, 2021
rixed added a commit that referenced this issue Jul 25, 2021
While at it, simplified user types to get rid of specific parser/printer
(DIL is not the place for that).

Ref #21
@rixed
Copy link
Owner Author
rixed commented Jul 30, 2021

Done for reading, still to be done when serializing.

@rixed rixed removed their assignment Jul 30, 2021
@rixed rixed self-assigned this Apr 22, 2022
rixed added a commit that referenced this issue Apr 22, 2022
…default

Turn the nullmask into a fieldmask, where any field can be missing (and then
replaced by its explicit or implicit default value).
Still TBD: skip encoding of default values.

Ref #21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request performance
Projects
None yet
Development

No branches or pull requests

1 participant
0