<div dir="ltr"><br><br><div class="gmail_quote">On Mon, Aug 25, 2008 at 7:54 PM, Niels Aan de Brugh <span dir="ltr">&lt;<a href="mailto:nielsadb@gmail.com">nielsadb@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Christopher Lane Hinson wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="Ih2E3d"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Here&#39;s an error the Haskell run-time system might throw:<br>
*** Exception: Prelude.head: empty list<br>
(or whatever)<br>
<br>
So now what? Action plan = [].<br>
</blockquote>
<br></div>
rgrep &quot; head &quot; .<br>
<br>
Lists 17 items for three projects I&#39;ve been working on summing to 10000 lines of haskell. &nbsp;Use listToMaybe or pattern matching and -Wall, and raise an explicit (error &quot;with explanation&quot;), which is all good practice in the C world as well. &nbsp;Please, don&#39;t make undocumented use of partial functions in serious code.<br>

</blockquote>
You&#39;re absolutely right, and the compiler can warn the programmer for such mistakes. However, I&#39;ve found that analysing the run-time behaviour/errors (if they do occur) in a Haskell program to be harder than in a language like C(++) which has many very mature engineering tools available. No doubt this is a matter of time and money, not which language is better suited for &quot;real work&quot;.<br>

</blockquote><div></div><div>I sort of agree with this, but I don&#39;t think that the total amount of time spent on that activity is even comparable for the two languages. In C/C++ breaking into the debugger and stepping through code is often the easiest way to even understand working code. That&#39;s both a testament to the high quality of the visual studio debugger, but it&#39;s also an indictment of how difficult it is to understand code written in the language.</div>
<div>In Haskell, on the other hand, everything is much more modular and &quot;direct&quot; and if you can&#39;t work out what the program does, a little poking in an interactive session will usually get you there far faster then anything you could do in C++. The same goes for tracking down bugs, IMO. It would be nicer to have better traditional debugging tools of course (particularly something that ties into a nice IDE), and I do think this should be a priority, but even then they wouldn&#39;t need to be used nearly as often as for C/C++.</div>
</div><br><br clear="all"><br>-- <br>Sebastian Sylvan<br>+44(0)7857-300802<br>UIN: 44640862<br>
</div>