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

Semantics of the evaluation of iterator arguments #2563

Open
rbehrends opened this issue Apr 15, 2015 · 1 comment
Open

Semantics of the evaluation of iterator arguments #2563

rbehrends opened this issue Apr 15, 2015 · 1 comment

Comments

@rbehrends
Copy link
Contributor

There is a potential issue with how iterator arguments are evaluated. See my Stackoverflow post here for the gritty details.

I also note that in addition to what I observed, sometimes inline iterators also seem to evaluate their arguments multiple times (e.g. if you make the take iterator in the code inline, it still doesn't work).

My recommendation would be to settle on once-per-iteration or once-per-loop evaluation as a default for both inline and closure iterators and to have a pragma to allow for the other behavior as an option.

@stale
Copy link

stale bot commented Aug 4, 2020

This issue has been automatically marked as stale because it has not had recent activity. If you think it is still a valid issue, write a comment below; otherwise it will be closed. Thank you for your contributions.

@stale stale bot added the stale Staled PR/issues; remove the label after fixing them label Aug 4, 2020
@ringabout ringabout removed the stale Staled PR/issues; remove the label after fixing them label Jan 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants