3 ms·
Exactly this ^ While effect systems are cool, they don't solve the problem described here, which is just that you need to be clear about the order of operation
by didibus 5y ago
Exactly this ^
While effect systems are cool, they don't solve the problem described here, which is just that you need to be clear about the order of operations that are order dependent.
The question would be, what programming style lets you most simply describe the operations and their needed order?
Functional programming is often also talked to as a type of dataflow programming, and the two share a lot in common. A dataflow approach in my opinion is best suited here, and functional programming can easily be used in a dataflow style.
The author's first example is actually pretty great, it defines a pipeline of operations, the pipeline is a very clear way to declare the order of operations.
Another popular approach is instead of explicitly declaring the order using dataflow constructs like a pipeline or a DAG, that you define the dependencies on prior operations and data, and the construct infers the order from those declared dependencies.