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

Expose an api for entirely non-null preferences #122

Closed
pforhan opened this issue Sep 18, 2018 · 5 comments
Closed

Expose an api for entirely non-null preferences #122

pforhan opened this issue Sep 18, 2018 · 5 comments

Comments

@pforhan
Copy link

pforhan commented Sep 18, 2018

It'd be very nice for cases where you don't have a null default and don't ever set null into a preference to have a clean non-null version of Preference. Would make kotlin interop better as well.

Looking through issue history, seems like there's a lot of conflicting threads pulling the library around nulls. Rather than force a change to existing Preferences a new set of NonNullPreference (though with a better name?) methods would be an easy change.

I could whip up a pull if this is appealing.

@f2prateek
Copy link
Owner

Would make kotlin interop better as well.

Can you describe some examples where the Kotlin interop can be improved?

@pforhan
Copy link
Author

pforhan commented Sep 18, 2018

Basically I wouldn't have to be reading (for example) Boolean? or need to use !! to assert that it really wasn't null.

@NightlyNexus
Copy link
Contributor

NightlyNexus commented Sep 18, 2018

are you on 2.0.0? i thought null was already banned in preferences now.

@pforhan
Copy link
Author

pforhan commented Sep 18, 2018

oops, no, still on an older version.

@pforhan pforhan closed this as completed Sep 18, 2018
@pforhan
Copy link
Author

pforhan commented Sep 18, 2018

looks like this has been resolved, so sorry. I checked issues but not the latest code, oops.

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

No branches or pull requests

3 participants