-
Notifications
You must be signed in to change notification settings - Fork 68
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
Better exercises for lambda and stl #416
Comments
Thanks for opening your first issue here! If you have any questions, feel free to mention one of the conveners, previous contributors, or attend our weekly meeting (see https://hepsoftwarefoundation.org/workinggroups/training.html). Also, sometimes issues go unnoticed, so don't hesitate to @mention some of us, if we do not come back to you within a few days. |
Thx @HereThereBeDragons for sketching that outline! I indeed think that the Historically, we had separate exercises for the STL and for lambdas. However: in the opposite order. We first introduced the STL using function objects, and then we had an exercise to convert a program using STL with function objects into a program using STL and lambdas. I campaigned for merging the two because I don't want students to practice writing function objects. Lambdas are just superior in most situations. That explains the status quo. I especially like your suggestion 1. of having a dedicated exercise on lambda functions without any STL. I would then still combine 2. and 3., because the starting point for the current |
I personally would keep 2. and 3. separate and have 3. as bonus exercise for the essential course and as a quick refresher exercise for the advanced course. Also I personally would vary a bit that you use more than just 2 STL functions |
After having a longer discussion yesterday with bernhard, i got the following idea how the difficulty of understanding lambdas and
stl
could be eased.I would suggest the following exercises (in order of execution):
lambda simple
: exercise to write simple lambda function, maybe even start with rewritting an existing function by a lambda - no usage of stllambda and stl - simple
: rewrite an (existing & fully functioning) program that usesstl
with function object to replace these function objects with lambdaslambda and stl - advanced
: have an unfinished program wherestl
functions and their respective lambdas must be added. could be that in the readme there is a list of possiblestl
functions to decide fromThe text was updated successfully, but these errors were encountered: