-
Notifications
You must be signed in to change notification settings - Fork 25
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
Should 'constraints' keyword be renamed? #136
Comments
A keyword 'validation' with a boolean type ought to indicate that validation is/is not applied; but that is not what is intended here. In the proposal whether validation is applied or not is controlled by the prescence or abscence of the key word. |
Here are a bunch of ideas and thoughts:
|
Even if we did adopt valid_if, the case for revising other keywords to match this style is weak as we are not changing the meaning of those other words. |
For what it's worth, I think |
We blindly converted all the v1.x constraint operators into v2.0 built-in functions. We haven't yet had the discussion about whether we should also change the names in the process. |
|
We could also borrow from YANG, and use the keyword |
I'm not keen on |
@pmjordan I agree. Technically it should be |
In Tal's latest proposal, the 'constraints' keyword has been renamed to 'validation'. The meaning of the 'validation' keyword is less intuitive than the original 'constraints', but the 'constraints' keyword suggest a multitude of constraints, which is no longer accurate now that we have introduced function syntax for expressing constraints/validations. Is there a better alternative or should we stick with the original 'constraints'?
The text was updated successfully, but these errors were encountered: