<br><br><div class="gmail_quote">2009/2/14 Peter Verswyvelen <span dir="ltr"><<a href="mailto:bugfact@gmail.com">bugfact@gmail.com</a>></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'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 :) </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't like it, you can still use Dynamic and Typeable ;-)</div><div></div></div></blockquote><div><br></div><div>I've found the same thing. An interesting observation is that (for me) the vast majority of the type errors are things that would'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's not just static typing, it's functional programming in conjunction with static strong type checking.</div><div><br></div><div>When all you're writing are expressions, then *everything* goes through some level of "sanity checking". When you're writing imperative code, a lot of the meaning of your program comes from the ordering of statements - which usually isn't checked at all (aside from scope).</div>
<div><br></div><div>So IMO static typing is good, but it's only with functional programming that it really shines.</div></div><br>-- <br>Sebastian Sylvan<br>+44(0)7857-300802<br>UIN: 44640862<br>