DDC compiler and effects; better than Haskell? (was Re: [Haskell-cafe] unsafeDestructiveAssign?)

Robin Green greenrd at greenrd.org
Tue Aug 11 16:51:30 EDT 2009

On Wed, 12 Aug 2009 11:37:02 +0200
Peter Verswyvelen <bugfact at gmail.com> wrote:

> Yes, sorry.
> But I think I already found the answer to my own question.
> DDC functions that are lazy don't allow side effects:
> http://www.haskell.org/haskellwiki/DDC/EvaluationOrder
> Anyway it would be cool if the DDC EffectSystem would also work on
> lazy functions :)

As was just pointed out in the unsafeDestructiveAssign thread from which
this thread was forked, effects are incompatible with non-strict
evaluation. The compiler is supposed to be able to reorder non-strict
evaluation to do optimisations, but that can't be done if effects
could happen. Also, effects would destroy modular reasoning.

More information about the Haskell-Cafe mailing list