-
Notifications
You must be signed in to change notification settings - Fork 57
Add support for Codable types to AppStorageKey #182
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
Conversation
@abdulilah99 Thanks for the nudge! We've let this sit long enough that we think support is probably worth the trade-offs. I'm going to merge as-is but will add some follow up documentation about the caveats. |
I'm a bit concerned about this change. There are so many I think it would be less magical, for example, if |
@pyrtsa We considered that but don't think it's a problem in practice, and we have plenty of tests showing that it does the right thing with more primitive types. We also couldn't come up with an example of things going wrong. The one place where this might not be the case is if someone writes a wrapper around |
@stephencelis But primitive types are only part of the picture. With #107, it's not just primitive types but Also, there's no way to customise the My worry is partly about the library painting itself into a corner here. Something that's completely avoidable with just a little bit more qualification to keep structured types isolated from the primitive types supported by |
Because
I think both of these issues could be addressed the same way they are addressed in
Can you qualify this worry a bit more with examples? I think the issues you brought up above are all addressable. |
I understand you’ve previously noted that Codable support is debatable, but adding it could significantly broaden the library’s range of use cases, I hope that makes it an appealing prospect for you.