Sunday, June 5, 2016

Should you use Haskell for a new project?

What are the pros and cons of trying to do a new project in Haskell, as opposed to some more mundane imperative language like Python or Java? Let's assume for the sake of argument that you are doing this for an employer, rather than for yourself as a side project. And let's also assume that you have a bit of Haskell experience, but like most programmers most of your work has been in mundane imperative languages.


To begin with, there are a couple of concerns that might kill an attempt to use Haskell.

  1. You might not be able to get management approval. Haskell is an obscure language with a reputation for difficulty. The bosses might well say no. 
  2. You might need to work with an existing codebase in something like Java or Python. Not possible from Haskell.

If those don't kill the project, there's the cost-benefit tradeoff. On the benefits side:

  1. Haskell code is very concise. (definitely) And greater concision means faster development. (possibly) 
  2. Haskell code is less likely to contain errors, because of very strict typing. (probably) 
  3. Haskell coders are disproportionately capable, because the language is obscure and difficult. (probably)

On the costs side:

  1. You have much more experience in other languages. It would take at least a year, maybe two before you'd be up to pro standards in Haskell. 
  2. The community of Haskell programmers is small. It might be difficult to hire anyone if the project grew; you might be faced with training someone from scratch, not just in a new language, but in a new programming paradigm.

So, this isn't anything like a slam dunk. Quite the opposite, actually. There are a couple of issues that might nix the project right up front, and then a daunting cost-benefit calculation.

No comments:

Post a Comment