-
-
Notifications
You must be signed in to change notification settings - Fork 195
stubs: Default implementations for functions #459
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
Well the stack trace is still somewhat useful, right? Since the line number shows which function we need to implement. I wouldn't mind keeping it. So my leading option is |
Another related question! Should we also provide variable names in the stub implementations? For example, instead of ... isLeapYear = error "You need to implement this function." ...we could write... isLeapYear year = error "You need to implement this function." |
I looked for past discussions of "eta" and got:
I'm basically going to agree with what we thought in the past. I support explicitly naming the variables.
|
With #471, this is now complete, right? |
Oh, I suppose explicitly naming the variables? |
Yeah! |
Currently, most, if not all, the exercises have stub solutions that have the form:
This is great, but the are two minor probems:
An alternative would be to use
error
with a custom message...... which is clearer in the source code and gives a slightly better error message:
Another options would be to use...
... which is not so beautiful in the source code, but gives the best error message:
So, which of the three solutions is better? What would be the best message to use?
The text was updated successfully, but these errors were encountered: