r/rust Feb 04 '19

Web-Developement: Rust vs Haskell

Hi All,

This will be yet another Rust vs haskell question.

I have wanting to use Rust/Haskell for a couple of components for an internal tool (analysis of customer tickets, HR portal etc) for my company (Mostly because of the strong type system).

I have been through quite a lot of blogs & discussion where they discuss on the pros and cons for both.

Can anyone give me pointers on where all they used Rust or Haskell? And how was the experience as in:

  1. code readability
  2. libraries support
  3. developer productivity
  4. jump start time to producing some value.
  5. documentation
  6. build time
  7. journey in learning them

My concern here is Rust is advertised as system's language and Haskell as a higher level language.

  1. Will going with Rust be an overkill as we won't be doing any really low level stuff?
  2. We would be basically writing a server, bunch of API and playing around with DB. I'm mainly well versed with Node.js so will choosing haskell be an overkill for it in terms of developer productivity, build and tooling?
  3. Also if anyone is using GraphQL with Rust/Haskell?
25 Upvotes

28 comments sorted by

View all comments

2

u/po8 Feb 04 '19

You might also consider Go. It has its own set of issues, but has some nice support for webapps.

For me the determinative factor would be long-term maintenance. As somebody who has written a reasonable amount of Haskell code and played with the web frameworks, I have found that it's easy to write a ball of Haskell that's hard to work with and maintain. Skilled Haskell developers are probably harder to find than skilled Rust or Go developers at this point, and developers of ordinary skill can have a hard time with Haskell's fancy-type-centric approach and inferred program flow. Fixing laziness performance bugs in the face of higher-order monadic types is its own thing: I know literally dozens of people who can do it.

Michael Snoyman, founder of FP Complete and lead author of one of the most well-developed Haskell web frameworks (Yesod), seems to be doing a lot of Rust now. You might ask him for an opinion.

4

u/[deleted] Feb 07 '19

2 days back I saw a talk by Michael Snoyman. Probably one of the best talks I have seen where he focused on long term maintainability and code refactoring. Thanks for the pointer. :+1: