Skip to content
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

About stl+lambda exercise #454

Open
chavid opened this issue Mar 10, 2023 · 1 comment
Open

About stl+lambda exercise #454

chavid opened this issue Mar 10, 2023 · 1 comment
Labels

Comments

@chavid
Copy link
Contributor

chavid commented Mar 10, 2023

As currently written, the students starts with std::generate, which is complex because
of the need of some internal persistent state. Several solutions:

  • find another generation algorithm which do not require internal state.
    why not directly random values ?
  • move it as intermediary/advanced later step.
    By the way, I strongly disagree with the current solution, based on an object-function class. You will frigthen beginners and let them think that the good old code is better ! It is far from perfect, but one can avoid this with an internal static int, or capture by reference an external int.
Copy link

stale bot commented Mar 9, 2024

This issue or pull request has been automatically marked as stale because it has not had recent activity. Please manually close it, if it is no longer relevant, or ask for help or support to help getting it unstuck. Let me bring this to the attention of @klieret @wdconinc @michmx for now.

@stale stale bot added the stale label Mar 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant