in reply to
Re: A preliminary stab at Flow-Based Programming
in thread A preliminary stab at Flow-Based Programming
Well, they are sort of related in that both FBP and State machines typically have a (uni)directional graph that forms the basis for the system.
However, at least as I've come to understand them, the state machine is where the "flow" through the system is decided by some ruleset, typically comparing a pointer to a storage area to the next possible states (ala regex'ing). The concept of flow based programming is that it's like a series of water pipes; there's no implicit decision block that decides if water can go to one pipe or the other when it reaches a split; it just fills them both. The concept here is that the water, supplied in my case by Reader and composed of chunks with one line of a file each, flow through the system, and are acted upon by each unit the water passes through. Thus, at the end, you'll get a stream of data that you need to do something with (in this case, it's written to STDOUT). Now, this doesn't mean that water can be diverted or blocked by units, but the units have to be built with this functionality. EG, a grep unit would only allow water chunks to pass through that meet the necessary requirements.
I believe that one of the end goals of FBP is that such a system leads to a visual/rapid design system for general programming solution. I don't suggest this will be replacing direct use of perl any time soon in writing web pages, but this would help those that have some but not sufficient programming skills to create repetitive type tasks easily without knowing the fundamentals.
Dr. Michael K. Neylon - firstname.lastname@example.org
"You've left the lens cap of your mind on again, Pinky" - The Brain
"I can see my house from here!"
It's not what you know, but knowing how to find it if you don't know that's important