Monday, August 9, 2010

Results from the State of Haskell, 2010 Survey

One week ago, I sent out a survey where I asked Haskell developers a few quick questions about their background and Haskell usage. Like the State of Clojure survey, I was trying to figure out

  • where Haskell programmers "come from",
  • in which domains Haskell is being used,
  • to what extent Haskell is used commercially, and
  • what the major weakness in the Haskell ecosystem are.

I got 804 responses, which is more than I expected. Since the survey was sent out to the main Haskell mailing lists, posted on my blog, and announced on Twitter there's most likely some selection bias in the results. However, given the number of replies, I still think the results are indicative of the community as a whole.

Without further ado, here are the results, together with some comments by me. You can find a link to the raw data at the end of this post.

How long have you been using Haskell?

The Haskell community continues to grow. Almost 75% joined the last three years.

How would you characterize your use of Haskell today?

Note that respondents could choose more than one option here, so results add up to more than 100%.

  • Lots of people use Haskell in their spare time for open source work.
  • Lots of people, like me, first discover Haskell in school.
  • I'm glad to see that as many as 25% are able to use Haskell at work, to some extent.
  • Many people are also currently tinkering with Haskell, perhaps looking for some "real" project to try it out on.

What is the status of Haskell in your workplace?

Note that only people who work at the moment responded to this question so the results differ a bit from the previous question. It would be interesting to know why little more than 50% of Haskell programmers don't use Haskell at work. Is it because of a company policy or isn't Haskell a good fit for the problem domain?

In which domain(s) are you using Haskell?

Note that respondents could choose more than one option here, so results add up to more than 100%.

There's been quite some buzz around Haskell web development on the mailing lists and on reddit lately, with several web frameworks being announced in a short time frame. I'd really like to see Haskell get better adoption in this area. Web development is still very immature: programmers create HTML documents by concatenating strings (using templating languages or not), leading to cut-n-paste programming and security problems. I think a web framework that integrates formlets could simplify much of the tedious and error prone work in web development today.

Compilers and interpreters is another big item, probably due to Haskell's use in academia but also due to Haskell being a very good language for manipulating algebraic data types, which are useful in compiler development. Since language attracts quite "hardcore" language geeks (in the positive sense), this is not much of a surprise.

I had a quick glance at the results categorized as "Others". Lots of different things in there but I don't think I've missed any major domains.

I would like to see more good libraries for (distributed) "Big Data" processing. The functional model works really well for such tasks, as shown by Google's MapReduce framework.

Which environment(s) do you use to work with Haskell?

Note that respondents could choose more than one option here, so results add up to more than 100%.

The typical Haskell programmers use a combination of a powerful text editor and a command line REPL (e.g. GHCi). Leksah is the biggest IDE at 6%. Haskell could probably gain increased adoption if it had e.g. a very good Eclipse plugin, as many programmers use that kind of environment today.

What language did you use just prior to adopting Haskell – or, if Haskell is not your primary language now, what is that primary language?

200

I'm only showing options that garnered more than 1% of responses; this was not a multiple-choice question. I might change it to be a multi-choice question next time as many people said they couldn't pick one language. The reason I tried to stick with one language is that I wanted people to try to pick one instead of listing all the languages they knew.

Lots of people come from the C, C++, and Java which is not that surprising given the sheer number of programmers that use those languages. If you look the Clojure survey very few people come to Clojure from C and C++. Perhaps more C and C++ programmers come to Haskell instead of Clojure because Haskell is a statically typed, compiled language with pretty good performance.

A large number of people have come over from Python. Perhaps due to that community having a large number of early adopters who are willing to try new languages.

If Haskell disappeared tomorrow, what language(s) might you use as a "replacement"?

Note that respondents could choose more than one option here, so results add up to more than 100%.

Again, I'm only showing options that garnered more than 1% of responses.

  • Perhaps unsurprisingly, the top 4 languages are all functional.
  • 29% of people in the Clojure community would move to Haskell if Clojure disappeared, according to the State of Clojure survey. 25% of Haskell programmers would move to Clojure of Haskell disappeared.

What do you think is Haskell's most glaring weakness / blind spot / problem?

There are a lot of responses to this question. I suggest you read the raw data for the full picture. Here's a summary:

  • Libraries, libraries, libraries: There are lots of libraries to choose from, but many users want better quality, better documentation and better cohesion. The Haskell Platform will hopefully address the third point eventually, but right now it mostly contains libraries adopted from the GHC extra libraries bundle and it doesn't feel like a tight knit set of core libraries. Perhaps the Haskell Platform should have its own documentation page with API docs and tutorials?
  • Reasoning about performance: Many programmers find it hard to reason about the performance of their programs, primarily due to laziness. We need more tutorials, books, and tools to help Haskell programmers reason about program performance. I'm giving a tutorial on high-performance Haskell at CUFP this year that I hope will be videotaped. Perhaps it's time for a high-performance Haskell book?
  • Development environments: Several people requested integration into widely used IDEs such as XCode, Visual Studio, and Eclipse.
  • A number of people have problem with package breakages. Better quality control and automatic continuous builds could help here.
  • A few people mentioned the learning curve, both in a positive and negative sense.

General Comments?

Lots of positive, encouraging comments. I've listed some of them below. Again, read the raw data for a complete picture.

  • "Excited and optimistic about the language, its future, and what appears to be a great community."
  • "I love Haskell. It's an endless source of knowledge and inspiration."
  • "Haskell is an amazing language. I don't know what I would do without it. Despite the list of problems above it remains tremendously useful. I write terse, readable programs that are frequently correct on the first try. It's unparalleled. Every advance I have made in understanding it thus far has had a substantial payoff."
  • "The Haskell community is very friendly and welcoming, and that makes a BIG difference."
  • "I am optimistic about Haskell, it is moving quickly in the right direction."
  • "I simply assume Haskell to be an important language (technology, really) in the future. However proud I am of being a Haskell'er, I don't see a time close where I'll be mentioning this in job interviews."
  • "main = mapM_ putStrLn $ words $ map Char.chr [73,32,108,111,118,101,32,72,97,115,107,101,108,108]"
  • "Haskell rocks my world!"

Lots of people thanked me for putting together the survey, so let me end with thanking all of you for taking your time to take it!

Raw data

All the source data is available in a spreadsheet in Google Docs or as an HTML table export from that spreadsheet.

I'll try to do a follow-up next year.

20 comments:

  1. "It would be interesting to know why the remaining ~50% don't use Haskell at work. Is it because of a company policy or isn't Haskell a good fit for the problem domain?"

    Neither. For me (I work for a university) it mostly comes to what the existing code base is written in, and others needing to be able to read and modify the code. Also because I'm still so much better in Python. And at the moment the language is dictated by other needs, since I'm designing a project for a programming course.

    ReplyDelete
  2. "Leksah is the biggest IDE at 6%. Haskell could probably gain increased adoption if it had e.g. a very good Eclipse plugin, as many programmers use that kind of environment today."
    Or it could gain adoption by making Leksah better and integrate more tools. Its more fun to do it in Haskell, and it works better. I started Leksah development 3 years ago. We are just two developers, so imagine what would be possible if we get more people interested to contribute.

    ReplyDelete
  3. You missed one fairly major possibility in "don't use it at work": that your coworkers don't know Haskell, so programs in Haskell are effectively unmaintainable. This is my situation.

    ReplyDelete
  4. This comment has been removed by a blog administrator.

    ReplyDelete
  5. The second graph (where Haskell is used) has percentages that add to more than 100%. What do these perecntages mean?

    ReplyDelete
  6. It would be interesting to know why the remaining ~50% don't use Haskell at work. Is it because of a company policy or isn't Haskell a good fit for the problem domain?"

    My reasons are multiple: 1) The company I work for does a lot of sensor data massaging, to the point where C++ just started to supplant C use about five years ago; 2)My "day job" does not involve programming, program analysis, or design; 3) The programming done in my company is heavily dominated by electrical engineers, as opposed to computer scientists.

    ReplyDelete
  7. The graph where "I don't use Haskell at work" shows 50% but obviously is more than 50% on the supporting pie chart seems a bit off.

    ReplyDelete
  8. Note that the respondents could choose more than one option in some of the questions and therefore the percentages might add up to more than 100%. I've added a comment under the charts where this is the case.

    ReplyDelete
  9. Jonathan, since the question was optional (i.e. only for people who are currently employed) Google Docs decided to aggregate the results in a somewhat unintuitive way (with the pie chart differing from the percentages). I've now recomputed and presented the numbers in a more intuitive way.

    ReplyDelete
  10. A hearty "hell yes" to the high-performance Haskell book.

    ReplyDelete
  11. > It would be interesting to know why little more than 50% of Haskell programmers don't use Haskell at work.
    > Is it because of a company policy or isn't Haskell a good fit for the problem domain?

    The reasons in my case are as follows:

    1) I work as a translator, not as a programmer.

    2) My (current) company is a scientific publication company. Nobody there whom I know programs.

    3) My goal in learning Haskell is to rediscover the fun of programming, not necessarily to use it at work.

    Back in circa 1982, I first started programming in N-80 BASIC for the NEC PC-8001 mkII personal computer. Back then, I used it to write a personal checkbook program. Then I learned Pascal in college, but hated it; using it was like trying to swim in a straitjacket. But then I was exposed to Scheme. Scheme was really fun; I was able to write most code in a functional style, without having to refer constantly to reference books. I used Scheme in one project to write Schemetris, a Scheme version of Tetris, using supplied libraries.

    Scheme led me to explore Haskell, which also emphasized the functional style. I also audited a course in Haskell in college taught by the same professor under whom I also took a course in formal semantics of programming languages.

    Eventually, I would like to write a reflective virtual world (or at least design one and hire a team of programmers, designers, and composers to develop one). Ideally, it would be modeled on the "Meet Me" virtual Tokyo developed by Transcosmos, but would function at the scale of "OZ," the hypothetical virtual world in the anime science fiction film "Summer Wars" (2009), directed by Mamoru Hosoda.

    ReplyDelete
  12. +1 on a high performance Haskell book

    ReplyDelete
  13. I don't use Haskell and we don't use Haskell at work because we don't need it. c++/Java/C#/ObjC covers our needs pretty well.

    ReplyDelete
  14. With C or Java I find myself crossing my fingers to not have any runtime errors, or bizarre values pop up from I/O, but with Haskell I find myself saying "Holy f^&%! I can't believe that just worked!"

    Then there's the FFI.. it's so nice to bring in C written system libraries.

    ReplyDelete
  15. I just started training on Haskell today. I think it's great. I'll tell you this, the things that make a language used at work are:

    1. Interface to UI, browser
    2. Interface to Data

    If you've got a better mousetrap for those, and a way to employ them in IT applications, then it's gold.

    ReplyDelete
  16. High performance Haskell book? Yes PLEASE!
    Tutorials on reasoning about program performance? Also yes please!
    Although "Real World Haskell" gave me a good starting point and useful hints, some more in-depth information, condensed in one place (such as a book) would probably help promoting the use of Haskell.

    BTW, I'm currently still "tinkering", finding it exceedingly cool, and having problems making my colleagues at work believe me that Haskell may be the better choice for many, many, many tasks over C++, which is currently being used here.
    .. more thoughts here: [http://www.goschs.de/doku.php?id=blog]

    ReplyDelete
  17. Stay tuned for some blog posts on reasoning about program performance.

    ReplyDelete
  18. High Performance Haskell Book would be amazing.

    As far as using Haskell at work, I have the same problem that others mentioned. Many don't know how to use Haskell, so the project would be unsustainable. The concern about libraries also contributes. A more cohesive library would be great.

    That being said, when I'm not forced into using Java or Python, I'm using Haskell

    ReplyDelete
  19. I have been using Haskell on and off pretty much since 1990, and ML before that. Seriously, why do I need to "reason about performance" at all? It's 2010; it seems to me either by now most optimization should be automatic, or one should rethink whether lazy FP is really the right approach.

    ReplyDelete
  20. i first knew Haskell through Wadler and Simon Peyton's papers 4 years ago and i have never looked back ever since,enjoying the syntactic sugar of lazy FP methods.

    ReplyDelete