Skip to content

Instantly share code, notes, and snippets.

@artiegold
artiegold / purescript-vs-elm.md
Created May 20, 2017 21:32
Elm vs PureScript -- I've typed this or something similar enough times to just stick it in a Gist : ]

I'm convinced one of them (or something similar) will be the future, but it's too soon to say for sure. The Elm community is growing crazy fast and it's really focused on being beginner-friendly and having a good dev experience (see this recent talk from Elm's creator: https://www.youtube.com/watch?v=oYk8CKH7OhE). This focus has kept the language simple and lots of work has been done on making the compiler errors helpful and instructive. Elm also limits communication with JS to an interface called 'ports', basically just message passing that both sides must parse and act on. Elm also has focused pretty exclusively on coding client-side UIs (i.e. the Angular or Ember or (most similarly) React+Redux space)

PureScript is a similar idea (a statically typed functional language compiling to JS), but with a different background and different short-term goals. PureScript modules compile to CommonJS modules. PureScript functions compile to JS functions. The FFI (talking to JS code) is more like TypeScript or F