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

Port break & continue to all backends #315

Merged
merged 1 commit into from
Nov 28, 2023

Conversation

jiribenes
Copy link
Contributor

@jiribenes jiribenes commented Nov 21, 2023

Motivation

We can port the new user-defined break and continue into all backends.
Resolves #314

Questions

  • Can this break some benchmarks we use? => It would be nice to benchmark this before merging.
  • Relates to Share standard library code between backends #309: can we share this and similar code among backends without needing to copy it into every backend separately?
  • Do we even want this change? Is this a design we're happy with?

@b-studios
Copy link
Collaborator

I am a big fan of this, since it shows that effects cannot only be used the high-level but also for very low-level things like jumps.

Can this break some benchmarks we use? => It would be nice to benchmark this before merging.

Breaks running the benchmarks => That's a severe problem (we should have CI for this!)
Breaks performance => I don't care (then we should fix the performance to support these kinds of programs)

can we share this

Yes! We need a solution for this... ASAP

Do we even want this change? Is this a design we're happy with?

I'd say just merge and redesign later ;) Things to concider:

  • break with a value (requires Control[T])
  • how to break out of nested loops

@b-studios
Copy link
Collaborator

@marzipankaiser @phischu could you briefly check whether this breaks the benchmarks?

@phischu
Copy link
Collaborator

phischu commented Nov 27, 2023

Breaks neither build nor performance for the benchmarks using the ml backend

@jiribenes jiribenes marked this pull request as ready for review November 28, 2023 15:57
@b-studios b-studios merged commit 76bd676 into master Nov 28, 2023
2 checks passed
@b-studios b-studios deleted the refactor/control-flow-stdlib branch November 28, 2023 21:31
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.

loop with early return
3 participants