<br><br><div class="gmail_quote">2009/2/14 Peter Verswyvelen <span dir="ltr">&lt;<a href="mailto:bugfact@gmail.com">bugfact@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
One of the things I liked a lot when working with C# was that as soon as my code compiled, it usually worked after an iteration of two.At least if we forget about the nasty imperative debugging that is needed after a while because of unanticipated and unchecked runtime side effects.<div>

<br></div><div><div>After heaving read about Haskell and having written some small programs for the last year or so, I&#39;m now finally writing a bigger program with it. It is not so easy yet since learning a language and trying to reach a deadline at the same time is hard :)&nbsp;</div>

<div><br></div><div>However, it is just amazing that whenever my Haskell program compiles (which to be fair can take a while for an average Haskeller like me ;-), it just... works! I have heard rumors that this was the case, but I can really confirm it.<br>

</div><div><br></div><div>A bit hurray for strong typing! (and if you don&#39;t like it, you can still use Dynamic and Typeable ;-)</div><div></div></div></blockquote><div><br></div><div>I&#39;ve found the same thing. An interesting observation is that (for me) the vast majority of the type errors are things that would&#39;ve happened in *any* statically typed language (like C#), but somehow Haskell manages to be a lot better at catching errors at compile time.</div>
<div>So my conclusion is that it&#39;s not just static typing, it&#39;s functional programming in conjunction with static strong type checking.</div><div><br></div><div>When all you&#39;re writing are expressions, then *everything* goes through some level of &quot;sanity checking&quot;. When you&#39;re writing imperative code, a lot of the meaning of your program comes from the ordering of statements - which usually isn&#39;t checked at all (aside from scope).</div>
<div><br></div><div>So IMO static typing is good, but it&#39;s only with functional programming that it really shines.</div></div><br>-- <br>Sebastian Sylvan<br>+44(0)7857-300802<br>UIN: 44640862<br>