Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What functional overlap is there between TypeScript and Scala.js?


TypeScript provides static types for JavaScript. Not just the language, but its idioms, its way of writing programs.

Scala.js is first Scala. That means you favor a style with immutable data, work with the great collection library of Scala all the time, and in general follow the idioms and way of writing programs that Scala offers.

Speaking in very broad terms, I could say TypeScript stays more in the "imperative" paradigm, while Scala goes more "functional". But of course in both languages, you will find people everywhere on the imperative<->pure FP spectrum. The center of gravity of TypeScript will be more on the imperative side and that of Scala, more on the FP side.

Also, Scala aims to have a sound type system. If your code compiles, it won't run into certain categories of bugs. TypeScript, by design, does not give any such guarantee.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: