[Haskell-cafe] What are side effects in Haskell?
leimy2k at gmail.com
Fri Jan 2 10:50:20 EST 2009
On Fri, Jan 2, 2009 at 2:52 AM, Cristiano Paris <frodo at theshire.org> wrote:
> On Tue, Dec 30, 2008 at 8:35 AM, Conal Elliott <conal at conal.net> wrote:
> >> Everything in Haskell is a function [...]
> > Where did this idea come from?
> > I'd say every expression in Haskell denotes a pure value, only some of
> > are functions (have type a->b for some types a & b).
> Maybe more formally correct, but my statement still holds true as any
> values can be tought as constant functions, even those representing
> functions themselves.
I think most of the introductory material I've seen that made me go "aha now
I get it" say pure functional programming is about values, and
transformations of those values, and that functions are also values. Then
they usually go into admitting that that's only really good for heating up
the CPU and that I/O and side-effects have to be made possible, but they're
not willing to give up what they won for us by having everything be a
value... then monads enter the discussion or "actions", and then monads get
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe