-
-
Notifications
You must be signed in to change notification settings - Fork 365
Return null values or throw exceptions in exercises? #360
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
Comments
Hm, thats tough. So my opinion is that the canonical-data should be the source of truth. Whatever is there, is what we render. I don't really think we should be making our own assumptions about what expected should be. Which means I believe we should just support both, and blame the canonical-data for using both. An example of what I mean is take the phone-number canonical-data and the collatz-conjecture canonical-data. phone-number explicitly states the expected return value should be |
Ok, I had forgotten some exercises canonical data called for |
@ErikSchierboom @jpreese after seeing #353 and #359 I think we should agree on when we are going to have exercises return null values vs throw exceptions.
I'd like us to have some consistency and purpose in why we use the two. To simplify things we could move either all invalid input to null or to throw exceptions.
What do you guys think?
The text was updated successfully, but these errors were encountered: