DDC compiler and effects; better than Haskell? (was Re:
sebastian.sylvan at gmail.com
Fri Aug 14 23:34:33 EDT 2009
On Sat, Aug 15, 2009 at 3:55 AM, John A. De Goes <john at n-brain.net> wrote:
> If you don't like the file system, consider mutable memory. An effect
> system will tell me I can safely update two pieces of non-overlapping,
> contiguous memory concurrently, even in different threads if the complexity
> so justifies it.
I'd like to point out that this relaxation of sequencing for memory
operations is already in effect in C on many CPUs. Even though you write
things sequentially, it doesn't actually happen sequentially unless you
explicitly say so with memory barriers. This causes massive head-aches and
horrible bugs that are almost impossible to track down whenever you actually
do depend on the order (usually in multi-threading scenarios, e.g. lockless
The point is, the safer option is to enforce a sequential model (like
Haskell does), since that way you can always rely on ordering even if you
don't even realise you need to, and there's plenty of practical experience
indicating that the other option (explicit barriers to indicate when
something isn't commutative) is sheer madness.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe