by ankrgyl · 15y ago · 0 comments
1.) Haskell is "a bad language to write IO intensive programs in"
2.) "maintenance is more expensive as Haskell programmers are thin on the ground"
I was convinced of neither.
First, just because your own (potentially biased) benchmark shows that GHC performs "very favorably" doesn't mean this is true in general. For anyone to buy that argument, you need to provide code or at least a precise description of the experiment. These guys did a good job of that: http://www.yesodweb.com/blog/2011/02/warp-speed-ahead. Also, just because iteratees are fast, doesn't mean they're "good" for writing I/O intensive programs in. They're really difficult to understand, so most people end up using lazy I/O. Part of not being bad for I/O programs is making the task approachable, and I'm not convinced of that by this article.
The argument to dispel #2 is vague too.
> If you agree that programs that are more correct are also of higher quality then the you should also agree that the cost of maintenance for Haskell programs is lower than for imperative programs.
Okay... You can still write errors in Haskell, they're just less frequent (at least that's what this statement suggests). But how can you maintain them if no one is willing to actually do it? If it's N times easier to maintain a Haskell programmer, there need to be at least 1/N as many Haskell programmers as there are imperative programmers, and the article doesn't address this at all. As someone who likes Haskell, I'm actually curious to know if this is true.
> import qualified Data.ByteString.Lazy.Char8 as L
> main = L.getContents >>= print . L.count '\n'
edit: actually it beats "wc", and is roughly same speed as "wc -l".
I think that Haskell's forced purity is roughly as good at catching logic errors as the strict typing of C++ or the clean syntax of Python: It catches some stuff, some of the time, but never everything, and never reliably. At some point, the onus is on the programmer to write good code.