Option for reader to only check nil
Opened this issue · 0 comments
evanthegrayt commented
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.