Need advice about which tool to choose?Ask the StackShare community!


+ 1

+ 1
Add tool

Elm vs Haskell: What are the differences?

What is Elm? A type inferred, functional reactive language that compiles to HTML, CSS, and JavaScript. Writing HTML apps is super easy with elm-lang/html. Not only does it render extremely fast, it also quietly guides you towards well-architected code.

What is Haskell? An advanced purely-functional programming language. .

Elm and Haskell can be primarily classified as "Languages" tools.

"Code stays clean" is the primary reason why developers consider Elm over the competitors, whereas "Purely-functional programming " was stated as the key factor in picking Haskell.

Elm is an open source tool with 5.3K GitHub stars and 424 GitHub forks. Here's a link to Elm's open source repository on GitHub.

According to the StackShare community, Haskell has a broader approval, being mentioned in 33 company stacks & 47 developers stacks; compared to Elm, which is listed in 27 company stacks and 35 developer stacks.

Decisions about Elm and Haskell
Timm Stelzer
Software Engineer at Flexperto GmbH · | 18 upvotes · 155.5K views

We have a lot of experience in JavaScript, writing our services in NodeJS allows developers to transition to the back end without any friction, without having to learn a new language. There is also the option to write services in TypeScript, which adds an expressive type layer. The semi-shared ecosystem between front and back end is nice as well, though specifically NodeJS libraries sometimes suffer in quality, compared to other major languages.

As for why we didn't pick the other languages, most of it comes down to "personal preference" and historically grown code bases, but let's do some post-hoc deduction:

Go is a practical choice, reasonably easy to learn, but until we find performance issues with our NodeJS stack, there is simply no reason to switch. The benefits of using NodeJS so far outweigh those of picking Go. This might change in the future.

PHP is a language we're still using in big parts of our system, and are still sometimes writing new code in. Modern PHP has fixed some of its issues, and probably has the fastest development cycle time, but it suffers around modelling complex asynchronous tasks, and (on a personal note) lack of support for writing in a functional style.

We don't use Python, Elixir or Ruby, mostly because of personal preference and for historic reasons.

Rust, though I personally love and use it in my projects, would require us to specifically hire for that, as the learning curve is quite steep. Its web ecosystem is OK by now (see, but in my opinion, it is still no where near that of the other web languages. In other words, we are not willing to pay the price for playing this innovation card.

Haskell, as with Rust, I personally adore, but is simply too esoteric for us. There are problem domains where it shines, ours is not one of them.

See more
Get Advice from developers at your company using Private StackShare. Sign up for Private StackShare.
Learn More
Pros of Elm
Pros of Haskell
  • 42
    Code stays clean
  • 40
    Great type system
  • 38
    No Runtime Exceptions
  • 31
  • 26
    Easy to understand
  • 20
  • 20
    Type safety
  • 14
    JS fatigue
  • 10
  • 10
    Ecosystem agrees on one Application Architecture
  • 8
    Friendly compiler messages
  • 6
    Welcoming community
  • 6
    Fast rendering
  • 5
    If it compiles, it runs
  • 4
    Stable ecosystem
  • 3
    'Batteries included'
  • 1
  • 83
    Purely-functional programming
  • 64
    Statically typed
  • 57
  • 38
    Open source
  • 37
    Great community
  • 29
  • 29
    Built-in concurrency
  • 28
    Built-in parallelism
  • 22
    Referentially transparent
  • 18
  • 13
    Intellectual satisfaction
  • 13
    Type inference
  • 11
    If it compiles, it's correct
  • 7
  • 7
  • 4
    Great type system
  • 4
    Proposition testing with QuickCheck
  • 3
    One of the most powerful languages *(see blub paradox)*
  • 2
    Highly expressive, type-safe, fast development time
  • 2
    Kind system
  • 2
    Purely-functional Programming
  • 2
    Pattern matching and completeness checking
  • 2
    Better type-safe than sorry
  • 2
    Type classes
  • 2
    Best in class thinking tool
  • 2
    Great maintainability of the code
  • 2
  • 2
  • 0
  • 0

Sign up to add or upvote prosMake informed product decisions

Cons of Elm
Cons of Haskell
  • 2
    No typeclasses -> repitition (i.e. map has 130versions)
  • 2
    JS interoperability a bit more involved
  • 1
    Backwards compability breaks between releases
  • 1
    More code is required
  • 1
    Main developer enforces "the correct" style hard
  • 1
    JS interop can not be async
  • 1
    No communication with users
  • 6
    Error messages can be very confusing
  • 6
    Too much distraction in language extensions
  • 4
    Libraries have poor documentation
  • 3
    No best practices
  • 3
    No good ABI
  • 2
    Poor packaging for apps written in it for Linux distros
  • 2
    Sometimes performance is unpredictable
  • 1
    Slow compilation

Sign up to add or upvote consMake informed product decisions

What companies use Elm?
What companies use Haskell?
See which teams inside your own company are using Elm or Haskell.
Sign up for Private StackShareLearn More

Sign up to get full access to all the companiesMake informed product decisions

What tools integrate with Elm?
What tools integrate with Haskell?

Sign up to get full access to all the tool integrationsMake informed product decisions

What are some alternatives to Elm and Haskell?
TypeScript is a language for application-scale JavaScript development. It's a typed superset of JavaScript that compiles to plain JavaScript.
Lots of people use React as the V in MVC. Since React makes no assumptions about the rest of your technology stack, it's easy to try it out on a small feature in an existing project.
A small strongly typed programming language with expressive types that compiles to JavaScript, written in and inspired by Haskell.
It lets you write simple, fast and quality type safe code while leveraging both the JavaScript & OCaml ecosystems.It is powerful, safe type inference means you rarely have to annotate types, but everything gets checked for you.
If you've ever built a JavaScript application, the chances are you've encountered – or at least heard of – frameworks like React, Angular, Vue and Ractive. Like Svelte, these tools all share a goal of making it easy to build slick interactive user interfaces. Rather than interpreting your application code at run time, your app is converted into ideal JavaScript at build time. That means you don't pay the performance cost of the framework's abstractions, or incur a penalty when your app first loads.
See all alternatives