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

Req. integer text de/encoding #97

Closed
oscbyspro opened this issue Apr 27, 2023 · 2 comments
Closed

Req. integer text de/encoding #97

oscbyspro opened this issue Apr 27, 2023 · 2 comments
Labels
addition oh, so shiny!

Comments

@oscbyspro
Copy link
Owner

I think it's reasonable to expect all integers to implement their own text de/encoding methods. It's such an easily forgettable constraint, otherwise. Ideally, these customization points would already be required by BinaryInteger, but they aren't (#60).

@oscbyspro oscbyspro added the addition oh, so shiny! label Apr 27, 2023
@oscbyspro
Copy link
Owner Author

oscbyspro commented Apr 27, 2023

By reasonable I mean: Swift already provides this functionality sans customizability.

@oscbyspro oscbyspro changed the title ANKBinaryInteger: BigEndianTextCodable Req. integer text de/encoding Apr 27, 2023
@oscbyspro
Copy link
Owner Author

oscbyspro commented Apr 28, 2023

Correction: Swift's text de/encoding methods are declared as extensions on FixedWidthInteger. I noticed this when I tried to forward a default implementation from ANKBinaryInteger. I suppose I'll do it from ANKFixedWidthInteger instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addition oh, so shiny!
Projects
None yet
Development

No branches or pull requests

1 participant