What is a dataflow programming language? Why use it? and are there any benefits to it?
Excel (and other spreadsheets) are essentially dataflow languages. Dataflow languages are a lot like functional programming languages, except that the values at the leaves of the whole program graph are not values at all, but variables (or value streams), so that when they change, the changes ripple and flow up the graph.
Dataflow programming languages are ones that focus on the state of the program and cause operations to occur according to any change in the state. Dataflow programming languages are inherently parallel, because the operations rely on inputs that when met will cause the operation to execute. This means unlike a normal program where one operation is followed by the next operation, in a dataflow program operations will execute as long as the inputs are met and thus there is no set order.
Often dataflow programming languages use a large hashtable where the keys are the data of the program and the values of the table are pointers to the operations of the program. This makes multicore programs easier to create in a dataflow programming language, since each core would only need the hashtable to work.
A common example of a dataflow programming language is a spread sheet program which has columns of data that are affected by other columns of data. Should the data in one column change, other data in the other columns will probably change with it. Although the spread sheet program is the most common example of a dataflow programming language, most of them tend to be graphical languages.
Some examples of dataflow languages:
- LabVIEW
- SCADE/Lustre, used in defence, aerospace and power plant industries
- VHDL and Verilog are essentially dataflow
- Spreadsheets are essentially dataflow
- Pure Data, dataflow for audio processing
- Max/MSP
Some lesser known ones:
- vvvv
- Chuck
- Ptolemy II
- Esterel
- Nyquist
- Shake
One kind of dataflow programming is reactive programming. When this style of programming is used in a functional language, it's called functional reactive programming. An example of a functional reactive programming language for the web is Flapjax.
Also, anic is a dataflow language recently discussed on Hacker News.
Another example is Martlet from Oxford.
Many ETL tools are also in this realm. The dataflow tasks in MS SSIS are a good example. Graphical tool in this case.
It is actually quite an old concept - in the 70's, there was even a language + machine built for efficient dataflow programming and execution (-> manchester data flow machine).
The great thing about it is its duality to lazy functional languages like Haskell. Therefore, if your processing steps are pure functional, and given you have enough processing units to evaluate them and pass results around, you get maximum parallelity for free - automatically and without any programming effort!