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

Better output for skipped instructions #245

Open
sbergen opened this issue Sep 24, 2024 · 0 comments
Open

Better output for skipped instructions #245

sbergen opened this issue Sep 24, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@sbergen
Copy link
Owner

sbergen commented Sep 24, 2024

For cases where steps are executed conditionally, instead of using Return or Do with an empty body, it would be better to explicitly mark something as skipped (both for code and output clarity).

One option would be to use a Skip instruction e.g.

ContinueWith(x => x
    ? DoY()
    : Skip("Skipping Y because foo"))

Adding some kind of conditional operator is probably not a good idea, as it would then not support e.g. switch statements, and we don't want to reinvent control flow (any more than is necessary 😆).

@sbergen sbergen added the enhancement New feature or request label Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant