[Haskell-cafe] What are side effects in Haskell?

David Leimbach 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
> which
> > 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.
> Cristiano

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
introduced later.


> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20090102/b85b87b9/attachment-0001.htm

More information about the Haskell-Cafe mailing list