Elektrine lite

← Feed

@squaresinger@lemmy.world

Post #1665229

2026-04-09 22:31 UTC

Why do programs written in Haskell not have side effects? To have side effects someone would have to run the programs.

Replies (2)

  • Of course, they have side effects. Side effects are what the computation does. Otherwise, they would simply make the box hot. The difference between Haskell and most languages is that Haskell forces one to keep that impurity at the outer edges. It enforces that constantly, making programs easier to reason about. I heard it explained succinctly lately: types are all of the possible inputs and outputs of a program while functions encapsulate the mutation. Excel, for example, is a purely functional language.

    Open ##1665255

  • @MonkderVierte@lemmy.zip 2026-04-10 09:48

    pandoc.

    Open ##1665256