Debugging haskell
Andrew Moran
moran@galois.com
Mon, 24 Feb 2003 07:22:18 -0800
Dave Tweed wrote:
> If you discard `compliation preventing, very very quick to solve' bugs
> (e.g., missing semi-colons in C++, silly typecheck errors in Haskell) I
> find that the ratio between source code bugs and algorithm bugs is mayb=
e
> 1:5. This means that whilst I find Haskell a great deal easier to write
> correctly than C++, there's not that much difference between debugging
> times for Haskell and C++ because the algorithm level bugs dominate.
In my experience, the number of algorithm bugs is usually about the same,=
=20
regardless of which language you're using. And simple source code bugs a=
re=20
no real problem in any language. But because there's more translation=20
involved in rendering a mental model of an algorithm in C++ than in Haske=
ll,=20
there's much more opportunity for introducing more subtle source code bug=
s. =20
I find that I very rarely have these kinds of bugs in Haskell (and the=20
type-checker usually catches them anyway), but they were always the large=
st=20
proportion of bugs when I used to program in C, etc.
A
--=20
Andy Moran Ph. (503) 526 34=
72
Galois Connections Inc. Fax. (503) 350 08=
33
3875 SW Hall Blvd. http://www.galois.c=
om
Beaverton, OR 97005 moran@galois.c=
om