-
-
Notifications
You must be signed in to change notification settings - Fork 195
stubs: Add explicit arguments to functions (good for git practice) #473
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
would you prefer to leave this issue to be gradually solved by newcomers, or would it be ok solve many in a single PR? |
At first the idea was to leave it for newcomers but, besides some people I personally asked and oriented, it seems there is no demand for that. Feel free to solve as many as you want! 👍 The only thing I think may be a good idea is to make a commit per exercise. What do you think? |
yeah a commit per exercise seems the way to go 👍 |
Sorry for that. Sometimes I forget that we have deprecated exercises, because it seems that we cannot remove them from the repository. Feel free to skip or change them, @lpalma! The list of deprecated exercises is in the
|
I have appended "(deprecated)" to those five in the list. |
As discussed in #459, it seems to be a good idea to add explicit arguments to all the stub solutions, because...
For example, in the following code,
... it is not immediately clear what the argument for the function is. Adding an explicit argument solves the problem:
Sometimes, the meaning is obvious and generic argument names can be used:
Considering that this is a great opportunity to expose students to good argument naming practices, we should be extremely careful when choosing the argument names. This is how I usually try to name the arguments:
x
,y
andz
for arguments of the same type.xs
,ys
andzs
for lists and strings.xss
,yss
,zss
for lists of lists.f
,g
andh
for functions.p
for functions that return aBool
.Below there is a list of exercises that do not have yet explicit arguments in the stubs. The changes are kind of trivial, so this is a good opportunity for anyone trying to get used to
git
:Feel free to open a pull requests to fix any exercise in this list, but please use an informative title, like this:
The text was updated successfully, but these errors were encountered: