Pro Great and simple way to learn Purely Functional Programming
You can try to apply some functional programming ideas in other languages that have an imperative basis, but you haven't seen the real power unless you tried it in the environment of purely functional programming. Elm is a simple language with great learning resources and easy graphical output, which makes it easy to explore the power of functional programming. Plus programming in Elm is very readable.
Pro Good tooling
All major editors have great support. With Atom for example, Elm plugins are available for linting, formatting, make/compiler support and Elmjutsu will simply overflow you with super useful functions, like navigate to referenced definition and show expression type.
Pro Static module system
Elm uses easy to use modules.
import List import List as L import List exposing (..) import List exposing ( map, foldl ) import Maybe exposing ( Maybe ) import Maybe exposing ( Maybe(..) ) import Maybe exposing ( Maybe(Just) )
module MyModule exposing (foo, bar)
Pro Growing community
Pro Higher confidence in code correctness and quality
Pure functions, immutable data structures, amazing compiler, clean and homologous syntax used for HTML, logic, and optionally to replace CSS, elimination of entire classes of bugs so you don't even need most unit tests. These factors lead to better code, better programs, higher confidence, and ultimately, more satisfaction.
Pro Not quite Haskell semantics
Con Harder to get buy-in from devs and mgmt
It's a total divergence from what most people are used to in the JS ecosystem. The change in syntax can be scary, the change in approaching problems can be scary. The fact that it's not backed by FANG can be scary. The fact that it's not v1.0 can be scary. The governance model and the deliberately slow release cadence can be scary. There are a couple harsh medium articles, hackernews/reddit posts out there made by people with an ax to grind that can be scary if you don't have a better picture of the Elm community, the tradeoffs that have been made, or the benefits to be had over other options. None of these are good reasons to write off further investigation of a great tech, but it happens.
Con Poor Windows support
Few if any of Elm's core contributors are Windows users and breaking bugs are sometimes left for weeks or months.
Con Adds an additional layer of abstraction
Some users claim that Elm adds an additional layer of abstraction, meaning that it is one more hurdle between the brain and the product.
Flagged Pros + Cons
Pro Designed around high-level front-end development
As Elm was designed as a front-end langauge, it has out of the box support for things like DOM-element creation, letting programmers focus on their application logic, rather than implementation details specific to the web.
Con Cannot use third party libraries
Elm does not have a Foreign Function Interface (FFI), so you can't really use third party libraries with Elm.
Con Missing syntactic sugar ('where' clauses, pattern guards)
Elm is missing a lot of syntactic sugar that Haskellers may consider core, such as 'do' notation, 'where' clauses, pattern guards, and operator sections.
Con No classes and instances
No classes and instances like Haskell has.
Con Not quite Haskell semantics
Elm is a strict language, semantically different from Haskell. Elm also borrows a lot from OCaml and F#. While this makes for a nice syntax, it does mean that, for the Haskell programmer, there may be some surprises when it comes to semantics or function names.
Out of Date Pros + Cons
Pro Good documentation
Elm is gaining popularity, somewhat faster than many of the other solutions here. This translates to more code examples, more documentation, and more libraries.
Pro High-level Functional-Reactive Code
Build animations, games, and interactions with an incredibly small amount of terse, readable code.
Pro Good way to get introduced to Functional Reactive Programming
You may have already seen reactive programming in other languages, but functional reactive programming requires a purely function programming language like Elm. If you're doing any work on Graphical User Interfaces, you'll be interested in the patterns you can find in a language like Elm, which has built-in support for FRP.
Pro First class FRP and Reactive DOM
FRP is at the core of Elm philosophy, thus FRP constructs are really clean and simple to use and integrates really well with the rest of the others libraries.
FRP in Elm feels like Reactive Extensions (ReactiveX), so if you are used to this, Elm is probably the easiest way to go.
Con Poor tooling
There are editor plugins, but neither of them support basic features yet like
- navigate to referenced definition
- show expression type
Pro Time-travelling debugger and Hot-swapping of code
Elms purity and high-level FRP primitives allow for similarly higher-level tools that other languages can only dream of.