Flow-driven programming is a computer programming paradigm used by traditional programs, which follow their own control flow pattern, only sometimes changing course at branch points (in this, it is markedly similar to procedural programming). Many common programs will fall under this paradigm, for example, wget would seem to fall under it, as the flow of the program is not based on outside events, but rather on the operations as structured in the program being performed. This is in contrast to Event-driven programming, which is especially common in applications which are asynchronous, such as a text editor, a kernel, or a GUI application.
The direct opposite to flow-driven programming is event-driven programming; in this paradigm, the program is not in control of when it receives input - it merely processes the data received through a callback or similar and takes the needed course of action. Due to the prerequisite state constraints, event-driven programming tends to be favoured by purely functional languages, whereas flow-driven programming is embodied better in imperative programming languages. However, monads have proven powerful enough to use an imperative style in a purely functional language with a small amount of purely syntactic sugar (ie, no semantic, only providing a nicer way of writing what could be written before), allowing a more flow-driven approach. In fact, it is possible to view monadic binding itself as a flow mechanism, so that monadic programming and flow-driven programming coincide is no great surprise.
|