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

Rename "WrappedDefault" and "WrappedDefaultOptional"? #73

Closed
jessesquires opened this issue Mar 18, 2023 · 3 comments · Fixed by #94
Closed

Rename "WrappedDefault" and "WrappedDefaultOptional"? #73

jessesquires opened this issue Mar 18, 2023 · 3 comments · Fixed by #94

Comments

@jessesquires
Copy link
Owner

Initially I struggled to come up with a good name here and I honestly don't like this name at all.

  • No property wrappers use "wrapped" in the name. It's kinda lame, like writing class NetworkManagerClass { }.
  • SwiftUI took AppStorage, so we can't use that.

Right now, I'm thinking FoilStorage and FoilStorageOptional ?

Open to ideas here.

@jessesquires
Copy link
Owner Author

cc @basememara @ejensen @JonnyBeeGod @nolanw in case any of you have opinions here! 😄

@nolanw
Copy link
Collaborator

nolanw commented Mar 18, 2023

I agree it's a clunky name. Though if I had no idea what Foil (the library) was and came across some property marked WrappedDefault that took a key parameter, I would confidently guess it's backed by UserDefaults. That seems useful.

I like keeping "default" in the name because one of the distinguishing characteristics of Foil is that it correctly registers defaults. And "foil" is a wrapping (and I think you did good choosing that name). So maybe FoilDefault and FoilDefaultOptional? Gives a hint that it's UserDefaults and also explains why import Foil is at the top of the file.

Or FoilWrapped and FoilWrappedOptional? Like "what's this wrapped in?" "Foil." But then you have to know that "Foil" means UserDefaults :)

@jessesquires jessesquires added this to the NEXT milestone Mar 23, 2023
@jessesquires
Copy link
Owner Author

Thanks for this @nolanw ! 🙌🏼

I'm thinking maybe... FoilDefaultStorage and FoilDefaultStorageOptional?

Maybe that's too much of a mouthful?

also cc: @jgale in case you have any thoughts or opinions here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants