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

Rework While #501

Open
liamhuber opened this issue Nov 21, 2024 · 0 comments
Open

Rework While #501

liamhuber opened this issue Nov 21, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@liamhuber
Copy link
Member

To guarantee retrospective provenance without further user intervention, and simplify requirements on input channels (i.e. make it so only one input channel is necessary).

The outline is to replace the current While macro with a new While(Node) class in which the run functionality is overridden so it keeps instantiating new body and condition nodes as long as the condition is False. This is in analogy to how For clears its body and re-instantiates body nodes to accommodate the length of the input. As there, the while-node IO is static, but the internals lack prospective provenance in favour of having clear retrospective provenance.

From an implementation perspective, we would have a while_node method analogous to the for_node method that takes the body and condition classes, data on how the internal (looping) wiring should be, and returns a new dynamic While subclass. In this way, we never actually connect more than one output to the same input, although in a graphical scripting representation we might allow users to specify looping as though they are doing this.

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