Skip to content

Add support for branching #148

@RunDevelopment

Description

@RunDevelopment

We could do branching by using a special value representing a not-taken branch:

The main problem is that the current execution engine takes all possible paths. This is good and what we want it to do, but it makes branching (where we only want it to take some paths) difficult. So how about we use a special value, let's call it D, to represent a branch that is not taken?
To create a dead branch, a node simply has to output D in any of its outputs. Nodes would then handle D inputs as follows: if any of the required inputs is D, output D, and if an optional input is D, set the input to its default value. This is enough to implement branching (assuming no cycles).

This system would transparently implement branching. The D-input check would happen before actually running nodes, so our current nodes will just work in this system.

That being said, this only how to do branching. I don't have any good ideas as for how we could do the condition expressions.

For more information, see here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions