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

Option for reader to only check nil #11

Open
evanthegrayt opened this issue Jan 6, 2022 · 0 comments
Open

Option for reader to only check nil #11

evanthegrayt opened this issue Jan 6, 2022 · 0 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@evanthegrayt
Copy link
Owner

evanthegrayt commented Jan 6, 2022

Currently debating if bool_reader should have a way to only check against nil. Currently, it will return false if the ivar value is nil or false, but sometimes you need to just see if the value is set, even if it's false. This will fail in that instance.

It could be argued that the user can just define a condition, but this seems like something that would be used enough to make an actual option for.

In fact, you could even argue that this should be the default.

To counter the previous points, it could be argued that if your value is expected to be a boolean (false), then you'll mostly likely be using bool_accessor anyway.

I'm going to ponder this for a bit. Feedback is welcome.

@evanthegrayt evanthegrayt added enhancement New feature or request question Further information is requested labels Jan 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant