-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
refactor: major refactor of byte_type #21
Conversation
Co-authored-by: Elias Sjögreen <[email protected]>
Co-authored-by: Elias Sjögreen <[email protected]>
Co-authored-by: Elias Sjögreen <[email protected]>
Co-authored-by: Elias Sjögreen <[email protected]>
…nmanz/byte_type into breaking_change_references
…eaking_change_references
The last few commits also added type checking on the tagged union discriminant. If you have string keys you need to specify a codec. If it's integers you may specify what type of integer (bigint / 64 bit ints are not supported). Also floats can break the typecheck but I wouldn't know how to fix that. (also doesn't make sense to use floats as discriminant) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. One nit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can still see lot's of improvements and changes but for now this looks great! Thank you!
We can discuss those on discord soon ish maybe? I have some more changes that I want to make to taggedunion for example |
Some mega changes have been made.
threetwo types Sized or Unsized. They inherit eachother, so Sized types are also Unsized. Meaning that they will help with type strictness.readPacked
,writePacked
,read
andwrite
3. Compound types like structs, arrays, tuples and unions can also be written or read as(not relevant anymore)packed
meaning it reads the least amount of bytes necessaryTaggedUnion
It implements both Aligned and Packed meaning it can be read and written in all the ways possible(not relevant anymore)TODO's for later pr's:
Range checksDoneTestsViewable
types.Sized
compound types forViewable
structs etc (lazy reading / writing)