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

Remove *_until-style iteration methods. #495

Merged
merged 1 commit into from
Sep 7, 2024
Merged

Remove *_until-style iteration methods. #495

merged 1 commit into from
Sep 7, 2024

Conversation

jemc
Copy link
Contributor

@jemc jemc commented Aug 31, 2024

This style/convention is a legacy from an old version of the Savi language, in which yield blocks could not be "jumped out of".

Now that return, error!, and break can all jump out of a yield block, the pattern (of allowing the caller to yield back a Bool to indicate whether iteration should continue) is obsolete, and should be removed to reduce complexity and maintenance burden.

This style/convention is a legacy from an old version of the Savi
language, in which yield blocks could not be "jumped out of".

Now that `return`, `error!`, and `break` can all jump out of
a yield block, the pattern (of allowing the caller to yield back
a `Bool` to indicate whether iteration should continue) is obsolete,
and should be removed to reduce complexity and maintenance burden.
@jemc jemc self-assigned this Aug 31, 2024
@jemc jemc merged commit 32e8caa into main Sep 7, 2024
6 of 8 checks passed
@jemc jemc deleted the remove/until-methods branch September 7, 2024 00:40
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

Successfully merging this pull request may close these issues.

1 participant