4 ms·
Does Haskell offer any tangible, practical advantages or benefits over other languages in the context of a web framework, aside from just "if you prefer a funct
by jsdalton 15y ago
Does Haskell offer any tangible, practical advantages or benefits over other languages in the context of a web framework, aside from just "if you prefer a functional style of programming and you're working on a web project, here's a way to do it"?
I'd love for somebody to convince me why a Haskell approach to web frameworks is superior to Python/PHP/Ruby/JS beyond the usual "it's a matter of taste" argument.
- jamwt 15y agoHaskell's advantages (and disadvantages) as a Web Framework are generally the same as in any other application domain: performance, concurrency, and correctness.
- zura 15y agoWhile I agree regarding correctness and concurrency, I wouldn't emphasize performance, even for Java and .NET, whose GCs are more developed, tuned and tested in the production environment than Haskell's one. Edit: And for Haskell, achieving needed performance can be quite tricky with regard to its laziness.
- jamesbritt 15y agoThere was some discussion on HN about the Snap Web framework benchmarks relative to some other frameworks: http://news.ycombinator.com/item?id=1380405 http://news.ycombinator.com/item?id=1380405 No .Net in there, though.
- danieldk 15y agoEdit: And for Haskell, achieving needed performance can be quite tricky with regard to its laziness. But Snap is driven by enumerators/iteratees (via the enumerator package), which make it much easier to do fast near-constant space IO. I have built a web application that uses Snap to query large (parse) treebanks, and it was easy to make it performant.
- supersillyus 15y agoFor one, GHC gives you M:N threads with the runtime handling the async IO under the hood, making it possible to write code in a simple blocking style while still getting use of all your cores and having fast IO. This is also true for Erlang, Go, and a few others, though, and it's not terribly relevant for lots of simple web code, but it is a practical advantage.
- jerf 15y ago"Does Haskell offer any tangible, practical advantages or benefits over other languages in the context of a web framework, aside from just "if you prefer a functional style of programming and you're working on a web project, here's a way to do it"?" At the moment, my answer is "Not yet, but ask again in a year." There are tons of interesting things happening in the area of letting you have "performance, correctness, rapid development and prototyping, pick three", but they're still in the early phases yet.