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

Let's rename the 'validator' rule to 'check_with' #405

Closed
funkyfuture opened this issue Jun 4, 2018 · 4 comments
Closed

Let's rename the 'validator' rule to 'check_with' #405

funkyfuture opened this issue Jun 4, 2018 · 4 comments
Assignees
Milestone

Comments

@funkyfuture
Copy link
Member

funkyfuture commented Jun 4, 2018

as we are evolving a concept for the next major release, we have the opportunity for a thing i like best: breaking things.

i'm not very fond of the circumstance that the number one object of the library and a default rule it provides have the same name: validator.

it makes especially communicating to humans about Cerberus harder and potentially misleading. it probably also doesn't help to conceptualize Cerberus (or the opposite, who knows, depending on the recipient). in some client code this may resolve in longer or confusing variable names. (users that read code that makes use of Cerberus and don't know more about it than its designation - which is obvious due to the names validate etc. - are an audience to be considered as well.)

what could be another name that describes the rather autonomous validation rule validator that offers a lot of leverage and requires more than entry-level effort by users? it should not include more than two morphemes, ten chars max seems reasonable, and no short hamming distance to any other relevant term obviously.

if renamed, a deprecation layer could easily be provided, as no other rule with that name would be added ever again.

@nicolaiarocci
Copy link
Member

  • validate_with
  • validate_function

?

There are probably better options out there. Agree on the deprecation period.

@funkyfuture
Copy link
Member Author

your first is my fav so far, i came up with

  • check
  • checker

and now

  • check_with

the _with variants fit best for both single and multiple 'validators' that may be provided as constraints.

@nicolaiarocci
Copy link
Member

check_with is nice, yes. Concise and yet clear.

@nicolaiarocci
Copy link
Member

I guess we want the new name to go live with 1.3, so we can drop the old one with 2.0?

@funkyfuture funkyfuture added this to the 1.3 milestone Jun 20, 2018
@funkyfuture funkyfuture changed the title Could there be a better name for the 'validator' rule? Let's rename the 'validator' rule to Jun 20, 2018
@funkyfuture funkyfuture changed the title Let's rename the 'validator' rule to Let's rename the 'validator' rule to 'check_with' Jun 20, 2018
@funkyfuture funkyfuture self-assigned this Jul 6, 2018
funkyfuture added a commit to funkyfuture/cerberus that referenced this issue Jul 7, 2018
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

2 participants