-
Notifications
You must be signed in to change notification settings - Fork 114
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
Add parameter sanity checking to all functions/modules #108
Comments
Currently, in Do we want to forbid this usage and force |
I think the point is we want to catch user input errors and flag them. I don't want to spend an hour trying to figure out why
is producing a 2 unit diameter result no matter how I set In the case of |
I do think we want to allow mixing |
That's fine. I think that as long as the input is unambiguous, it's fine. But if the input is incomplete or ambiguous then there should be an error. |
I've committed a tweak to |
I noticed that |
I went through all the calls to it, and I'm pretty certain it'll work as expected. |
Someone mentioned this issue on the forum, and it's a real issue. When you pass the wrong type of parameter to a function/module you often get mysterious errors that are hard to understand.
I think that in any case where it doesn't cripple performance we should add full parameter checking. I was thinking we could have functions like
Or maybe we make a master type checker function that takes a list of types like ["number","vector"] and allows any one of those types.
Also when parameters are redundant, that should be an error. I've implemented cases like this, but I don't think it's systematic. In other words, if you specify
r
andd
you don't pick one...you give an error.The text was updated successfully, but these errors were encountered: