Vendor libs like zlib should use distinct types for sizes... #2770
Beefster09
started this conversation in
Proposals
Replies: 1 comment 1 reply
-
You can vary the size of a type without making it distinct. I don't see how distinct helps with making the code portable? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I hop between Linux and Windows to make sure my game continues to work on both and ran into a discrepancy between platforms because zlib uses differently sized types for compress and decompress buffer sizes depending on whether you build with VC++ or GCC.
I propose that distinct types be used in cases like these to make it harder to accidentally create non-portable code that could otherwise be easily made portable.
Beta Was this translation helpful? Give feedback.
All reactions