3 ms·
Although in conventional languages with control flow, we're more used to how they're done, both branching and looping can be done straightforwardly in dataflow
by DonaldFisk 7y ago
Although in conventional languages with control flow, we're more used to how they're done, both branching and looping can be done straightforwardly in dataflow without introducing any non-dataflow constructs - just graphs with vertices connected by edges.
Branching: http://www.fmjlang.co.uk/fmj/tutorials/Conditional.html http://www.fmjlang.co.uk/fmj/tutorials/Conditional.html
Looping: http://www.fmjlang.co.uk/fmj/tutorials/Iteration.html http://www.fmjlang.co.uk/fmj/tutorials/Iteration.html
Emit and collect:
http://www.fmjlang.co.uk/fmj/tutorials/Macros.html http://www.fmjlang.co.uk/fmj/tutorials/Macros.html
These show the basic idea. There are many other examples throughout the tutorials (http://www.fmjlang.co.uk/fmj/tutorials/TOC.html http://www.fmjlang.co.uk/fmj/tutorials/TOC.html).
BTW, in case anyone's wondering why there have been no recent updates to the pages on my visual dataflow language, it's because the many improvements I've been making, particularly big changes to the type system, have required a lot more work than I expected. I haven't abandoned work on it, but it will still be some time before it's ready for release.
- BubRoss 7y agoThose show that it's possible, not necessarily that it's a good interface to make those parts of programs. Houdini's shader language has had branching done in a data flow graph for a long time. Touch designer has a kind of looping construct too. You might want to take a look at these domain specific interfaces if you are doing your own graph, they are well done. Fundamentally though, the density of text expressions exceeds a data flow graph by a huge margin. If what is being done isn't fundamentally a directed acyclic graph, visualizing it with a graph becomes more difficult to absorb than the expressions as text.