Hacker News new | ask | show | jobs
by benjaminjackman 3710 days ago
This reflects my use case. I was just writing Scala code that compiles to both the JVM and JS. The requirements for the code in terms of performance for the JVM side are very intense which ruled out using Typescript there. I am using the browser for visualizations / UI where I have used Typescript in the past, between using Vanilla Javascript and then Coffeescript and before Scala.js was available.

I continue to watch Typescript because I think it has its place and certainly is worth knowing / using in certain projects. I really appreciate the .d.ts/DefinitelyTyped (files which provide Typescript static types for javascript libraries) that are available, I am able to mostly convert them to ScalaJS facades programatically which gives me nice code complete in ScalaJS.

One area I think Typescript outshines ScalaJS is if you have a large existing Javascript codebase, or are a Javascript programmer looking to incrementally improve your codebase / language knowledge Typescript is the best step in that direction.

However if you are going `full stack`, with high performance requirements on one side, and a browser on the other, right now I think Scala is the best option. That opinion might change in the future with web-assembly (then perhaps back again e.g. scala.native ).