1. 5

  2. 3

    My summary of Scala.js’s good points that this article mentions (because its table of contents repeats some points):

    • static typing with type inference (for error detection without boilerplate)
    • IDE and refactoring support
    • an ecosystem of editor plugins
    • a large ecosystem of libraries and bindings
    • relatively easy JVM/JS platform interop and easy writing of bindings
    • a library for building web apps server-side as well as client-side, so as to share code

    Some good points that Scala.js does not have:

    • quick compile times
    • simplicity
    • purity from side effects in the type system
    • in my experience, Scala lacks good documentation for its tooling (it’s hard to set up a project and import it into my IDE so everything works)

    Some close compile-to-JS competitors and their biggest weaknesses compared to Scala.js:

    • ClojureScript – not statically typed
    • TypeScript – weak type system, less-ergonomic server-side libraries
    • Kotlin – unstable JS tooling, slightly worse type system than Scala, less-ergonomic server-side libraries
    • Elm/PureScript – no server-side support
    • Haskell with GHCJS – incomplete platform compatibility (or so I heard a while ago), difficult interop and poor library ecosystem
    • OCaml with Js_of_ocaml – unstable tooling, difficult interop and poor library ecosystem
    • Haxe – worse type system; I don’t know much about its server-side libraries or its ecosystem