News for hackers. Stuff that matters.
Re:Monads Schmonads: Functional Input Without Tears (PYFL) by anderskaseorg on Sunday May 23, 2021 @08:35PM (#27259967)
That would be equally true of a programming model where every program is a pure function from a list of input lines to a list of output lines. Everyone would agree that such a model is pure (if limiting), even though the function itself is just a function, and the language runtime takes care of the ugly low-level details of actually making the system calls that read lines from STDIN and write lines to STDOUT.

Purity doesn’t mean that effects don’t happen. It means that effects don’t happen as a side effect of mere expression evaluation.

Re:Monads Schmonads: Functional Input Without Tears (PYFL) by Twisol on Monday May 24, 2021 @12:36AM (#27261110)
> Purity doesn’t mean that effects don’t happen. It means that effects don’t happen as a side effect of mere expression evaluation.

I don't disagree? I was adding color to your explanation for other readers, not attempting to correct you.

The evaluation of a program merely reduces or simplifies it, transforming its structure without adding or removing information. When we can't reduce further without interacting with the environment, something else must mediate that interaction.

> That would be equally true of a programming model where every program is a pure function from a list of input lines to a list of output lines.

Indeed, Haskell used this model (`[Request] -> [Response]`) before switching to use an IO monad. It made for a poor architectural basis for complex programs.