4 ms·
I don't think that data flow is a higher level of abstraction to control flow. They're just different types of abstraction, and each has its strengths and weakn
by taneq 10y ago
I don't think that data flow is a higher level of abstraction to control flow. They're just different types of abstraction, and each has its strengths and weaknesses.
If you only ever work on things that map well to functional programming then you'll naturally think it's superior to imperative programming. Likewise, if you only ever work on things that map well to imperative programming, then the functional programming approach seems a bit silly.
- brianberns 10y agoImplementing an algorithm in a functional language almost always requires less code than implementing the same algorithm in an imperative language. That is direct evidence that functional languages are more abstract.
- TuringTest 10y agoFunctional code can represent an imperative program (using temporal logic or state monads), so it can be used for domains where you would use imperative code. It will not always be easier, but it certainly provides more control over the execution flow.