<br><br><div class="gmail_quote">On Tue, Nov 3, 2009 at 10:44 PM, Ben Lippmeier <span dir="ltr">&lt;<a href="mailto:Ben.Lippmeier@anu.edu.au">Ben.Lippmeier@anu.edu.au</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
David Leimbach wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I have to admit, the first time I hit the wiki page for DDC I said to myself &quot;Self, this sounds crazy complicated&quot;.  Then I read part of the PDF (your thesis I believe) about Region Types on the bus ride to work and thought.  &quot;Gee I think I scared myself off too quickly&quot;.<br>

<br>
Uniqueness typing is quite interesting in Clean, but to control aliasing, like really *control* aliasing, that&#39;s just far out man.<br>
<br>
So I still have to wrap my head around &quot;why this isn&#39;t going to get completely out of control&quot; and see why it&#39;s all safer than just writing C code but I must say the attention I will be paying to DDC has just gone quite a bit up.<br>

</blockquote>
<br>
:) A correct C program is just as safe as a correct Haskell/Disciple program.<br></blockquote><div><br></div><div>Well, of course, the question is in what sort of guarantees a language or compiler provides I guess.</div>
<div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>
If you&#39;re using destructive update then aliasing, side effects and mutability all start to matter. It might look complicated when you reflect all these things in the type system, but you&#39;re really just getting a handle on the inherent complications of the underlying program.<br>
</blockquote><div><br></div><div>So it&#39;s just really more notation to let you know which tools are being used when you use them?  </div><div><br></div><div>Does Disciple completely avoid the need for such things as unsafePerformIO? </div>
<div><br></div><div>(a perhaps overly paranoid comment but...)</div><div>I realize we&#39;re probably not supposed to worry about the existence of unsafePerformIO, and that library authors &quot;know what they&#39;re doing&quot;.  But doesn&#39;t it automatically mean that there&#39;s a bit of implicit trust whenever I see a function that&#39;s  of type (a -&gt; a) that there *isn&#39;t* IO going on in there? :-)</div>
<div><br></div><div>If Disciple can guarantee that no one is allowed to cheat, is that not a better approach?</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<br>
I suppose the trick is to be able to ignore said complications when you just don&#39;t care, or they&#39;re not relevant for your particular problem...<br></blockquote><div><br></div><div>Yes, the Disciple documentation says that this stuff can be inferred, but I don&#39;t even let Haskell infer my types for *any* functions I write in any code.  I like to restrict what can go in and out of the function even if it&#39;s more general.  Perhaps this is the knee-jerk reaction of an angry Erlang programmer who really wanted some types to reign in the overly-dynamic evaluations that are allowed in that environment, but that&#39;s how I roll baby!  I will admit that on occasion I will write and expression that I think does what I want, and look at in in ghci, having it tell me the type because sometimes I&#39;ve not had enough coffee to do it in my head, but I either look at the inferred type and realize that it&#39;s what I originally wanted, or add further restrictions.</div>
<div><br></div><div>Dave</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><font color="#888888">
<br>
Ben.<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</font></blockquote></div><br>