3 ms·
>Most of the non-functional "programming" in Flow based programs actually occurs at the level where you are composing the connections between processes (be that
by valarauca1 12y ago
>Most of the non-functional "programming" in Flow based programs actually occurs at the level where you are composing the connections between processes (be that the GUI, or in a hand-written method which makes the connections).
This is false, there are entire languages that do line by line compilation via Flow Based Programming.
>One additional benefit of FBP which it shares with traditional FP programs is that they are capable of exhibiting "lazy" execution
This is blatantly wrong and the main thing I was trying to express.
Flow Based Programming is based off a topographical analysis of the code body. Which is a analysis of object dependencies (where a dependency is code that must be executed before the object (code) in question can be run).
Meaning objects are executed in the order in which they have the least number of dependencies. This means one off sections of code, that do not necessarily need input from external, or exist independent of otherwise coherent processes he processed first.
For example (Example 1)
Path p = resolve_path();
if(something_happened())
{
FP fp = open(p, "rw);
write(fp, "logloglog");
close(fp);
}
This above code is bad, because path P is always resolved, regardless of error state.
A Currying analysis (lazy evaluation) will change this flow via lazy evaluation (or should ideally):
(example 2)
if(something_happened())
{
Path p = resolve_path();
FP fp = open(p, "rw);
write(fp, "logloglog");
close(fp);
}
A topological flow based compiler will prefer path P be constant. It will prefer example 1, to example 2 every time (if its given example 1 as base code). And likely ensure that path P is solved for absolutely first in a function AS resolve_path() depends on no code being executed before it.
This is the flaw in most flow based programs. Is they don't care errors like this, and when the errors do exit, they optimize for them to be more apparent.
:.:.:
This is what I mean by a topographical analysis being the opposite of a Currying analysis. They group code differently, in almost an opposite fashion. Curry trys to group code by purpose. Topological by how much code has to be executed before it.
Both have their uses.