-
Notifications
You must be signed in to change notification settings - Fork 64
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
renaming validate_numeric args for clarity. #867
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we do a deprecation cycle on this rather than breaking?
Sure, though, this next release will be filled with breaking changes already... I figured we might as well get as many in now as we can so that way moving to 1.0 there's none. But I'm ok with doing a deprecation here 👍 |
Added in the deprecation. This is what it'll look like.
|
Sorry to chime in late! I think What if we changed the name to exactly what it does using more "mathy" terms:
And I'm not sure there is an option, but may be worth adding a I think since these terms are fairly common and have a strictly defined meaning that may be more intuitive and accurate. It is more wordy for sure, but these types of validations typically aren't used that much, and if they are I think the wordiness is helpful to make sure it is accurate. What do you think? |
Sure! This is why I did rc1 and not a full release 😂 get all our breaking changes out now so once 1.0 is solid, we don't break stuff. We can open a new issue for this |
Fixes #824
This is a breaking change. The idea here is that if you had this code:
To me, this reads like
if 4 > 4
which is false, so you might expect this to return false, but it does not. It returns true because it runsif 4 >= 4
. This especially gets weird if you're expecting it to be>
and you put something likeWhich would allow
age == 17
. The same is true on the upper end withless_than
.less_than: 100
still allows 100.Now these are renamed to
at_least
andno_more_than
so you can say