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

Jason Dusek jason.dusek at gmail.com
Sat Aug 15 08:36:54 EDT 2009

2009/08/14 John A. De Goes <john at n-brain.net>:
> Hmmm, my point (perhaps I wasn't clear), is that different
> effects have different commutability properties. In the case
> of a file system, you can commute two sequential reads from
> two different files.

  I think this is a bad example -- it's not something that's
  safe in general and discredits your idea. How would the
  compiler even know that two files are not actually the same

  However, the idea that a programmer can specify safely
  commuting effects is worthwhile. One could operate in a
  "different files are different" IO monad where the compiler
  assumes that reads on files with different names are

> This has no effect on the result of the computation, assuming
> no interference from other programs -- and if there _is_
> interference from other programs, then guarantees go out the
> window, _with or without_ commuting.

  Well, yes -- which sounds like, there are no guarantees
  in general. Something that works half the time leaves you with
  two responsibilities -- the old responsibility of the work you
  did when you didn't have it and the new responsibility of
  knowing when it applies and when it doesn't.

Jason Dusek

More information about the Haskell-Cafe mailing list