Scala vs PureScript
When comparing Scala vs PureScript, the Slant community recommends Scala for most people. In the question“What are the best (productivity-enhancing, well-designed, and concise, rather than just popular or time-tested) programming languages?” Scala is ranked 21st while PureScript is ranked 45th. The most important reason people chose Scala is:
The immutable values make it perfect for working with concurrency
Specs
Ranked in these QuestionsQuestion Ranking
Pros
Pro Immutable values
The immutable values make it perfect for working with concurrency
Pro Multiparadigm
Scala supports both Functional and Object Oriented styles of programming. Beginners can learn both paradigms without having to learn a new language, and experts can switch between the two according to what best suits their needs at the time.
Pro Type inference
Scala offers type inference, which, while giving the same safety as Java's type system, allows programmers to focus on the code itself, rather than on updating type annotations.
Pro Compiles to JVM bytecode
Aside from Java itself, Scala is by far the most popular of the many JVM languages. If you're developing for Android, or a similar JVM-only platform, or otherwise need out-of-the-box cross-platform compatibility, but the performance of a compiled language, Scala is the way to go.
Pro Very good online courses
On coursera you can find great introduction to Scala by Martin Odersky.
Pro Type inference leads to a simpler syntax
Pro Expressive functional programming abstraction for reusable and safe code
Pro Higher kinded types
Has Typeclasses and RankNTypes
Pro High performance FFI code
The Eff monad, which is used for FFI code, optimizes out calls to bind, and supports tail call optimization, resulting in clean, efficient Javascript. The psc compiler also specifically recognizes the ST monad, and transforms scoped variables into mutable Javascript variables, for even more efficient code.
Pro Type safety
Compiling should be your first unit test. A tight type system (static and hopefully strong) will catch many logic errors that are often difficult to spot through debugging. In languages like PureScript, if it compiles, it often runs properly.
Pro Pure functional language
You cannot have side effects, unless a function is explicitly defined as so.
Pro Modules can be compiled to CommonJS
Modules compiled to CommonJS can be included with 'require', making it incredibly simple to call Purescript code from Javascript.
Pro Has row polymorphism and extensible effects
Pro FFI
FFI system is quite good and easy to use. You can import functions curried or not curried. Records and arrays use native JS objects and arrays.
Pro Thorough documentation
The Purescript website has fairly thorough documentation for all of the language's features, and the Purescript blog contains several examples of practical usage.
Pro Awesome web frameworks
Thermite (React)
Halogen (VDOM, similar to ELM)
And hit these up with Signals, Isolated/(Managed?) Components, powerful functions and FFI
Cons
Con Can be intimidating for beginners
Scala is an industrial language. It brings functional programming to the JVM, but not with a "start small and grow the language" perspective, but rather a very powerful language for professional programmers.
Con Way too complex for beginners
Even for seasoned programmers it's a difficult language.
Con Static type system inherits cruft from Java
The type system is too complicated yet still less powerful than Haskell's.
Con Lots of dependencies needed to get started
Purescript is written in Haskell, but meant to be used with Node.js. As a result, to get started , users must install ghc, cabal, node.js, grunt, and bower. Purescript also has its own compiler, and different semantics form Haskell, and so even after installing, there's still some overhead to getting productive with Purescript.
Con Lack of good IDE/tooling support
Con Documentation not updated
Con Ecosystem not stable
Con Restrictive FFI
Functions exported are all curried, and must be called as such from Javascript. The FFI syntax for importing Javascript functions, while slightly simpler and more readable than UHC/Fay's, means that calls to methods on objects must be wrapped to pass the object explicitly as a parameter.
Con Slow compilation
On large project, for example Halogen