4 ms·
Yes, but I/O is impure and sequentially dependent, unlike mathematics. Maybe the "impedance mismatch" between pure-fp and I/O is too great, with the IO monad b
by mjburgess 8y ago
Yes, but I/O is impure and sequentially dependent, unlike mathematics.
Maybe the "impedance mismatch" between pure-fp and I/O is too great, with the IO monad being the "leaky abstraction" of the FP world.
Then OO is not a bad solution to an irrelevant problem, but a pretty-good solution to a bad relevant problem.
EDIT:
To clarify: The "problem" is change.
Imperative programming relates sequential device-change over time, to sequential programming lines. OO programming is a structured imperative programming.
Pure FP langs model sequential change with (roughly,) lists of actions to-be-performed that are snaked through your program.
(Also: maybe OO's failure has more to do with its limited static analysis, type systems, than its model of change?)
- Rumudiez 8y agoMathematics is sequentially dependent. Try 3/4==4/3 for a trivial example
- willtim 8y agoWhy is the IO monad a leaky abstraction? Any function that returns an IO computation in Haskell, is still a pure function.
- discreteevent 8y agoBackus: Well, because the fundamental paradigm did not include a way of dealing with real time. It was a way of saying how to transform this thing into that thing, but there was no element of time involved, and that was where it got hung up. Booch: That’s a problem you wrestled with for literally years. Backus: Yeah, and unsuccessfully. http://archive.computerhistory.org/resources/access/text/2013/05/102657970-05-01-acc.pdf http://archive.computerhistory.org/resources/access/text/201...
- mjburgess 8y agoThanks for the quote! Before I wrote that comment I was actually on the anti-OO side, and in writing it, I convinced myself that maybe the FP solution wasn't great. Good to see this wasn't a mistake!
- jononor 8y agoMost of your application logic should not have to care about I/O. That is a concern which should stay at the edges. This way it is easier to reason about the program, and test it.