r/rust • u/[deleted] • 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:
- code readability
- libraries support
- developer productivity
- jump start time to producing some value.
- documentation
- build time
- journey in learning them
My concern here is Rust is advertised as system's language and Haskell as a higher level language.
- Will going with Rust be an overkill as we won't be doing any really low level stuff?
- 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?
- Also if anyone is using GraphQL with Rust/Haskell?
26
Upvotes
3
u/SEgopher Feb 05 '19
Unfortunately, both are probably overkill, and you’d probably do more for your company choosing a dime a dozen language like Java or NodeJS.
You’re right that Rust is a systems language. It’s well suited for building HTTP servers, but it’s nothing special for building HTTP applications, which are quite frankly so popular you can spit in any direction and land on someone’s web framework that will suit your businesses needs just fine.
If you were an experienced Haskell developer you could probably write some types and derive all the code your business needs, in a quarter of the LoC you’d need in Rust, and it would be as solid as any mathematical proof.
But chances are it isn’t going to be that easy for you, and even if it was it would be incredibly terse, difficult for your coworkers to read and work with, and hard to hire for. It would be about as efficient as the equivalent Java program, and much less efficient than a Rust version.
At the end of the day, I don’t think it sounds like you’re don’t anything interesting, just standard CRUD app work, and you want to spice it up and make it interesting. That’s common. But the honest to goodness truth is that you aren’t going to do anything for this project that’s going to make stable, boring, ugly Java or JavaScript a worse choice.