5 ms·
Haskell's a good language, but I would add to this list the use cases as to where Haskell is the right tool for the job. I think this would help a lot beginners
by jonnybgood 13y ago
Haskell's a good language, but I would add to this list the use cases as to where Haskell is the right tool for the job. I think this would help a lot beginners get a better grasp of Haskell.
For example, I wouldn't tell someone to write a web server backend in Haskell if it's going to be in production. Sure, you can do it, but there are more adequate tools for the job. On the other hand, if you were looking to create a DSL or write a parser, Haskell would be great. This is how Galois and Facebook are taking advantage of Haskell.
- coolsunglasses 13y agoHaskell happens to be excellent for writing programs.
- jonnybgood 13y agoSo is C++ and every other modern language. Every language has its positives and negatives depending on the implementation. Haskell is no different. This is why having some impartiality to languages is important. You use the right tool for the job.
- laichzeit0 13y agoI would like to think so too, yet if you suggest e.g. using Perl or PHP on HN you'll have the typical backlash of "But why not Ruby or Python or etc. it's so much newer and better" This has been my personal observation since following HN for the past few years.
- jfischoff 13y agoAnd what is right job for whitespace?
- gregwebs 13y agoThere is greater leverage with Haskell in tackling hard problems or problems where there are existing quality libraries that can be leveraged (such as parsing). Haskell is probably not a good choice in comparison to C/Go/Java if having the best possible CPU performance is a requirement. I am not sure what you mean by a server backend, but that could potentially describe most Haskell code written in the modern networked world. I think the idea though that one language is objectively better at a certain task gets strongly warped by subjective factors. Ultimately language decision is more about the team of programmers you have, the available libraries and ecosystems, and the team's understanding of it. Perhaps not surprisingly, we have found that for programmers already experienced in Haskell, Haskell is a great language for most problems.
- jonnybgood 13y agoYes, I should of been more specific. I meant web server backend. Changed. I agree. Modern languages are converging on ideas more than ever so it starts to become subjective. However, there exists a subtlety in feature focus. Compare concurrency and distributed programming in Erlang and Haskell, for example. If you're proficient in both and your domain demands high concurrency, why would you choose the lesser of the two which is Haskell?
- codygman 13y agoWhy wouldn't you write a web server backend in Haskell? What is more adequate than Haskell for web server backends and why? You give no support to the claim that "There are more adequate tools than Haskell for writing web server backends".
- freyrs3 13y agoI'm surprised by this statement as well, considering the rather remarkable performance that Warp server[1] has been able to achieve. Writing highly concurrent servers is arguably one of Haskell's biggest strength. 1: http://aosabook.org/en/posa/warp.html http://aosabook.org/en/posa/warp.html
- platz 13y agoWarp seems plenty fast, but still didn't seem to do as well as I'd hoped, in this particular example, I wonder if they're doing it wrong. http://www.techempower.com/benchmarks/ http://www.techempower.com/benchmarks/ https://github.com/TechEmpower/FrameworkBenchmarks/blob/master/wai/bench/wai.hs https://github.com/TechEmpower/FrameworkBenchmarks/blob/mast...
- codygman 13y agoWarp didn't do as well I had hoped either. Keep an eye on the next tech empower web benchmark though because ghc 7.8 and mio made a lot of stuff faster.
- jonnybgood 13y agoThe JVM, for one. The JVM far exceeds Haskell in this regard. Superior libraries and equal if not better performance. I didn't say you couldn't, but for production purposes if I had to choose.
- codygman 13y agoDefine superior. Making such bold claims without any proof/examples is very poor form.
- copergi 13y ago>For example, I wouldn't tell someone to write a web server backend in Haskell if it's going to be in production. You probably shouldn't be giving advice then. >This is how Galois and Facebook are taking advantage of Haskell Facebook is using haskell for a high performance, high concurrency server for filtering. You do realize how similar that is to a web server right?