3 ms·
> the space and time performance of idiomatic Haskell code can be very surprising. That is indeed one of Haskell’s drawbacks, though personally it’s one I am c
by yakshaving_jgt 8y ago
> the space and time performance of idiomatic Haskell code can be very surprising.
That is indeed one of Haskell’s drawbacks, though personally it’s one I am comfortable with given the alternatives. I’m happy for a program to be correct and less performant than fast and wrong. The performance issues are also not intractable. The tools for measuring this are pretty good.
- tombert 8y agoI love Haskell, so I say this with all the love in the world, but the unpredictable nature of Haskell's performance actually can lead to incorrect code. For example, due to laziness, file-streaming with lazy IO can end up with files being closed before you're done consuming. This is almost certainly never what you want, so Haskell's system actually hurt correctness. In that particular case it's easy to get around if you use the Conduit library, but that's just one example.
- yakshaving_jgt 8y agoI appreciate criticism like that, because it's helpful and valid. I happen to be aware of this and I do use Conduit often, but it certainly bears talking about. Haskell isn't a panacea, but I absolutely do not believe that all technologies are ultimately equivalent.
- tombert 8y agoOh, definitely don't disagree with you there (PG's article about the "Blub" language is one of my favorites); I definitely think that Haskell is one of the least-bad languages out there overall. I will say that personally I have become somewhat enamored with Idris, but I think that most of the people that work on it claim that it is not production ready, and I've not used it for anything but personal projects. Still, I love that it gives me everything that I like about Haskell, and it's young enough to not have many of the drawbacks, at least not yet.
- tathougies 8y agoFile streaming with lazy IO is widely considered an anti pattern though. So while your criticism was true in the past, we have very good and performant alternatives today