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 exercise #454

Open
chavid opened this issue Mar 10, 2023 · 0 comments
Open

About stl exercise #454

chavid opened this issue Mar 10, 2023 · 0 comments

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.
    Or we should declare as a requirement the knowledge of object-functions ?
@stale stale bot added the stale label Mar 9, 2024
@chavid chavid removed the stale label Feb 12, 2025
@hsf-training hsf-training deleted a comment from stale bot Feb 12, 2025
@chavid chavid changed the title About stl+lambda exercise About stl exercise Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant