<br><br><div class="gmail_quote">On Sat, Aug 15, 2009 at 3:55 AM, John A. De Goes <span dir="ltr">&lt;<a href="mailto:john@n-brain.net">john@n-brain.net</a>&gt;</span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

If you don&#39;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.</blockquote>
<div><br></div><div>I&#39;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&#39;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 data structures).</div>
<div><br></div><div>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&#39;t even realise you need to, and there&#39;s plenty of practical experience indicating that the other option (explicit barriers to indicate when something isn&#39;t commutative) is sheer madness.</div>
<div><br></div><div> </div></div>-- <br>Sebastian Sylvan<br>