Hacker News new | ask | show | jobs
by amm 4892 days ago
For personal projects or for learning the principles of FP, there is nothing wrong with using Haskell.

From personal experience however, I will not be using Haskell again for a larger professional project, because our team ran into too many time consuming issues and problems that have been solved successfully in other languages/environments (especially the JVM) like dependency management or reasoning over runtime characteristics before deploying the application on production systems. Especially memory consumption is very hard to predict.

Of course, the language also has its benefits and even after some years it tickles your brain just the right way.

I like programming in Haskell very much, but in real world projects (you know - when you work in a team not only consisting of PhDs) I prefer Scala or Java, because getting a war file deployed or profiling an application is just so much easier.

YMMV, of course.

4 comments

When did you use Haskell?

The dependency hell situation has vastly improved (and there are plans to make it much better still).

I agree that a downside of Haskell's very high level nature is difficulty to predict some runtime characteristics. This is just an instance of the general trade-off between low-level and high-level languages. Everyone is already comfortable with the loss of easily predictable performance incurred by GC, but people are still not comfortable with the same w.r.t laziness.

I use Haskell for real world projects, and I find it more practical and more suitable than any other language I've ever used. Laziness rarely bites me, and has incredible real-world benefits such as easy refactoring and simpler code.

I think the silliness about PhD's is very very silly. Of the Haskell programmers I know, the majority don't have a first degree...

About profiling -- I have never profiled a Scala/Java application, but how much easier is it compared with: "cabal configure --enable-executable-profiling", and then running the program with "+RTS -p"? It may not be point-and-click, but it really is not hard at all.

>When did you use Haskell?

Roughly two years ago.

>I think the silliness about PhD's is very very silly.

Of course it is. I just wanted to make a point that the "average programmer" has probably never seen a single line of ML-syntax before.

>About profiling -- I have never profiled a Scala/Java application, but how much easier is it compared with: "cabal configure --enable executable-profiling", and then running the program with "+RTS -p"? It may not be point-and-click, but it really is not hard at all.

I don't remember exactly what we tried, what worked and what didn't; we had no experts on the team, and just came to the conclusion that hooking up jconsole/yourkit/<insert jvm profiler here> to a running jvm process and see what's happening in real time on an app server was so much more comfortable.

Two years ago the situation was far worse, dependency-hell-wise.

About hooking up the process for some profiling information, take a look at:

http://ocharles.org.uk/blog/posts/2012-12-11-24-day-of-hacka...

It's still bad and cabal is still bad. I was in #haskell on IRC not too long ago and they couldn't even figure out why a haskell-platform install couldn't upgrade its own cabal with no other packages installed.

Your propagandizing is either based on very insulated anecdote or you're being disingenuous for the sake of promoting your favorite language.

The salesmanship does not help Haskell and sets expectations poorly. Fix ghc-pkg and cabal!

Clojure and Go make this look ridiculous and unnecessary.

N.B. Been using Haskell off and on for 3 years. Never once has it not been a pain.

I am not saying cabal is perfect, but the situation has dramatically improved since the prevention of spurious reinstalls. It also seems that hackage uploaders are playing nicer these days, and I just generally get far less breakage.

Lots of work is being done on Haskell's package system to make it better.

I've been using Haskell for 5 years. It used to be very painful. It is only rarely painful these days.

It's rarely painful these days because you've spent 5 years learning it.
>It's still bad and cabal is still bad.

No, it isn't. You have the exact same problems with CPAN and everyone and even the most devoted perl-haters will admit "perl is a terrible language, but CPAN is amazing". You run into the exact same problems with every other language, the only difference being dynamic languages tend to be lazy about correctly managing version numbers, so you get "installs properly but completely breaks my app" instead of "tells you it can't install because of a version conflict".

>I was in #haskell on IRC not too long ago and they couldn't even figure out why a haskell-platform install couldn't upgrade its own cabal with no other packages installed.

Well obviously, since it does in fact work just fine, it is quite difficult to figure out what weirdness that individual did to create his problem.

>You have the exact same problems with CPAN

I don't use Perl and that's a crock anyway. I've used Leiningen on Clojure, easy_install/pip on Python and the Golang stack happily with no trouble. I don't like XML or Java, but you'd have a hard time arguing Maven "doesn't work". It's what Leiningen is built upon anyway. Rubygems, rbenv, and bundler aren't perfect but they do largely work for everybody in the Ruby community. Quicklisp has done a lot to improve the state of affairs in Common Lisp and made it pretty easy to use arbitrary libraries.

It's ghc-pkg/cabal on Haskell that have been a pain in the ass. Even sbt on Scala is better and that sucks too.

Cut the tu quoque bullshit, not everybody has a crappy ecosystem. Those that don't, don't because they didn't project a reality distortion field so they could pretend everything was hunky-dory.

Python used to have serious packaging problems. It got over them and eventually became a smooth experience because people recognized the problem and worked on it.

Clojure without Leiningen was horrific. Hagelberg's work there was amazing.

The Golang team has taken things like this seriously all along and since 1.0 a lot of things have been standardized.

Stop denying there's a problem. I'm far from the first person to mention the Haskell ecosystem need works.

The REAL irritation isn't with just ghc-pkg and cabal, but rather that I keep running into crazed partisans like you that won't admit there's a problem. You're the problem.

Could you elaborate what 'real-world' means to you in this context? Millions of users, hundreds of servers, a personal blog? 'Real-world' is often a very broad term with a huge likelihood of misunderstandings.
Serving my real needs both for a professional job:

* Debug information processing and analysis

* Concurrent execution of tests

* Build systems

* Various automation/scripting needs and other auxiliary projects

Also, in a different context, a structural editor for programming based on our own GUI framework (~10KLOC so far). This project is still preliminary but advancing at a (mostly) steady pace.

Thanks.
Interestingly, despite their respective reputations Haskell is by far more popular than Scala:

http://www.langpop.com/

There's lots of measures: Indeed job listings, google searches, mailing list volume; tiobe tries to incorporate a few.

http://www.drewconway.com/zia/?p=2892

http://www.wired.com/wiredenterprise/2012/06/berkeley-progra...

I think "respective reputations" can be quite subjective. In my circles Haskell is definitely more talked about/used.
Sure: In the "hacker" world it seems that people prefer Haskell (Purely functional, native code) to Scala (OO Hybrid, JVM).

However I'd say that Scala is far more popular for building bussiness/real software than Haskell is (Twitter for example).

What is a war file?
It's short for (Web Application ARchive), it's a jar file used for deploying web applications written to work on the JVM.
It's a zip file following Java convention that can be dropped in any Java web application server (like Apache Tomcat).

Basically a lot of sites you go to have been deployed by dropping a .war file in a Java web application server. That technologically powers a gigantic part of the Internet (just look at SO or Quora or expert exchange or any TIOOBE index or any Java job offer: Java webapps are pretty much powering the Real-World [TM]).

Are you suggesting that SO - StackOverflow.com - runs on Java?
Having no idea what the software stack is, and only basing a guess on having read plenty of Joel's musings, I'm guessing a Microsoft technology. I'm sure someone has the goods, or Google could probably answer.
It's an ASP.net MVC app, if I recall correctly. The .NET world has a parallel mechanism to .war deployment, though.
I think he is suggesting that the number of java related questions on those sites indicates the language is widely used. Neither SO or quora run on java.
I had the exact opposite experience. We switched from scala to haskell and it has been a huge relief. I spend no more time dealing with dependencies in haskell than I did in scala, and our team contains precisely zero people with any post-secondary education (I didn't even finish high school in fact). The myth that you need "a team of PhDs" is so bizarre and so far from reality that I don't understand how anyone who has taken any time to actually try haskell could repeat it.