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

No Words #96

Closed
oscbyspro opened this issue Apr 27, 2023 · 1 comment
Closed

No Words #96

oscbyspro opened this issue Apr 27, 2023 · 1 comment
Labels
subtraction huh? where did it go?

Comments

@oscbyspro
Copy link
Owner

oscbyspro commented Apr 27, 2023

This one's a bit though because ANKWords looks somewhat useful from afar, but I believe it can be cut after a closer look at it (#89). The reason it was added was to type-erase ANKFullWidth.Words. I realize now, however, that /words is unlikely to be used non-generically, since ANKFullWidth is itself an equivalent collection. At some point I added the 0 ..< count index constraint, but in the one place where I thought it would come in handy I ended up using a suffixing subsequence instead. Furthermore, ANKWords should conform to Sendable, which means that it cannot constrain pointer algorithms. It's not completely useless, but I don't think it warrants a spot on the-list-of-things-I-need-to-understand-to-use-this-package.

@oscbyspro oscbyspro added the subtraction huh? where did it go? label Apr 27, 2023
@oscbyspro
Copy link
Owner Author

oscbyspro commented Apr 27, 2023

Tangentially, here's a cool idea I've had (, listen or hire me!). Wouldn't it be awesome if associated type constraints could also be used as opaque type constraints? Then I could just add requirements to ANKBinaryInteger.Words and type-erase conforming types as follows:

var words: some ANKBinaryInteger.Words { ... }

@oscbyspro oscbyspro changed the title No Words No Words Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
subtraction huh? where did it go?
Projects
None yet
Development

No branches or pull requests

1 participant