3 ms·
I'm not arguing that 'trace' is subversive, rather, most of the time it's simply not necessary (or useful). Haskell's not like other languages, where you have
by jmillikin 16y ago
I'm not arguing that 'trace' is subversive, rather, most of the time it's simply not necessary (or useful).
Haskell's not like other languages, where you have to build up massive unreadable piles of code to get anything done. It's easier to write properly, with small functions glued together; and when you've done that, debugging is a matter of either simply reading the code, or running it in GHCI (and then reading it). Import your function, pass it input, see what comes out; when it's wrong, you know what the problem is.
Debugging with prints is for stuff that isn't pure, behavior that is outside the Haskell runtime system and thus can't be reasoned about. Which means you're using IO, which means you can take advantage of 'print' or whatever.
- xi 16y agoI'm not arguing that there are no ways to debug Haskell programs. My point was that the OP's phrase indicates at least basic familiarity with Haskell and debug printing might be the thing he had in mind writing it. Haskell's not like other languages, where you have to build up massive unreadable piles of code to get anything done. That's fanboyism. I understand you feel offended by the OP's post, but it is not a good satire unless it offends somebody, and IMO, the article is excellent in summarizing attitudes of some members of the Haskell community. ;)