<p dir="ltr">Is that really true, though?<br>
Usually when you have an infinite loop, you have progress of some sort. Infinite loops with no side effects can be removed from the program according to the C standard, for example. So, in general, we should allow programmers to express termination / progress, right? At that point, no computation ever "bottoms out"? </p>
<p dir="ltr">Shouldn't a hypothetical purely functional programming language better control this (by eg. Forcing totality?) It seems like we lose much of the benefits of purity by muddying the waters with divergence. </p>
<p dir="ltr">From an optimising compiler perspective, Haskell is on some weird lose-lose space, where you lose out on traditional compiler techniques that work on strict code, but it also does not allow the awesome stuff you could do with "pure" computation because bottom lurks everywhere. </p>
<p dir="ltr">What neat optimisations can be done on Haskell that can't be done in a traditional imperative language? I genuinely want to know. </p>
<p dir="ltr">What are your thoughts on this?</p>
<p dir="ltr">Cheers<br>
Siddharth</p>
<br><div class="gmail_quote"><div dir="ltr">On Tue 19 Dec, 2017, 08:09 Brandon Allbery, <<a href="mailto:allbery.b@gmail.com">allbery.b@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Define "natural".<div><br></div><div>You might want to look into the concept of Turing completeness. One could define a subset of Haskell in which bottoms cannot occur... but it turns out there's a lot of useful things you can't do in such a language. (In strict languages, these often are expressed as infinite loops of one kind or another. Note also that any dependency on external input is an infinite loop from the perspective of the language, since it can only be broken by the external entity providing the input.)</div></div><div class="gmail_extra"><br><div class="gmail_quote"></div></div><div class="gmail_extra"><div class="gmail_quote">On Tue, Dec 19, 2017 at 1:47 AM, (IIIT) Siddharth Bhat <span dir="ltr"><<a href="mailto:siddharth.bhat@research.iiit.ac.in" target="_blank">siddharth.bhat@research.iiit.ac.in</a>></span> wrote:<br></div></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I've been thinking about the issue of purity and speculation lately, and from what little I have read, it looks like the presence of bottom hiding inside a lazy value is a huge issue. <div><br></div><div>How "natural" is it for bottoms to exist? If one were to change Haskell and declare that any haskell value can be speculated upon, what ramifications does this have?</div><div><br></div><div>Is it totally broken? Is it "correct" but makes programming unpleasant? What's the catch? </div><div><br></div><div>Thanks,</div><div>Siddharth </div><span class="m_472540692635889510HOEnZb"><font color="#888888"><div dir="ltr">-- <br></div><div class="m_472540692635889510m_6248860296870175539gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Sending this from my phone, please excuse any typos!</div></div>
</font></span><br></blockquote></div></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">_______________________________________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
Only members subscribed via the mailman list are allowed to post.<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="m_472540692635889510gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>brandon s allbery kf8nh sine nomine associates</div><div><a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a> <a href="mailto:ballbery@sinenomine.net" target="_blank">ballbery@sinenomine.net</a></div><div>unix, openafs, kerberos, infrastructure, xmonad <a href="http://sinenomine.net" target="_blank">http://sinenomine.net</a></div></div></div>
</div>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
Only members subscribed via the mailman list are allowed to post.</blockquote></div><div dir="ltr">-- <br></div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Sending this from my phone, please excuse any typos!</div></div>