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

Add several common datatypes to module as shorthands #4

Closed
9 of 11 tasks
Dekkonot opened this issue May 4, 2020 · 2 comments · Fixed by #11
Closed
9 of 11 tasks

Add several common datatypes to module as shorthands #4

Dekkonot opened this issue May 4, 2020 · 2 comments · Fixed by #11
Labels
enhancement New feature or request

Comments

@Dekkonot
Copy link
Owner

Dekkonot commented May 4, 2020

Should include things like Int32 and UInt32. Should also shorthand some like writeByte -> writeUInt8.

Unclear how to handle assertions and testing. Seems like it may add a lot of overhead to run assertions twice in cases like writeFloat32.

  • UInt8
  • Int8
  • UInt16
  • Int16
  • UInt32
  • Int32
  • UInt64
  • Int64
  • Float16
  • Float32
  • Float64
@Dekkonot Dekkonot added enhancement New feature or request design needed Needs a good design to close labels May 4, 2020
@Dekkonot Dekkonot changed the title Add several common datatypes to module Add several common datatypes to module as shorthands May 4, 2020
@Dekkonot
Copy link
Owner Author

Dekkonot commented May 9, 2020

Upon further reflection, all those datatypes can use custom implementations anyway, so it's possible no design choices are needed (all of them are even bytes so writeByte can be used for all of them. That's at most 8 calls.)

Running the assertions multiple times is still a concern though; it might be an acceptable loss though, given they'll all just be using writeByte.

@Dekkonot Dekkonot removed the design needed Needs a good design to close label May 14, 2020
@Dekkonot
Copy link
Owner Author

UInt64 and Int64 are rejected at this moment -- the name is deceiving and creates the illusion of 64-bit integers. If 64-bit read/write functions are necessary, they can be added manually.

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

Successfully merging a pull request may close this issue.

1 participant