4 ms·
There's no runtime. The Scala language is compiled to JavaScript. There is no interpreter in JavaScript that runs the Scala code. There is a cost for the stand
by sjrd 4y ago
There's no runtime. The Scala language is compiled to JavaScript. There is no interpreter in JavaScript that runs the Scala code.
There is a cost for the standard collections library (from 100 to 200 KB depending on what you use) but otherwise you only pay for what you use.
- nikitaga 4y agoIt's also worth noting that Scala / Scala.js includes lots of features that JS developers use a plethora of third party libraries for. For example JS has no immutable collections built-in, so you'd need something like immutable.js (65KB) which is annoying to use because it's not integrated with other libraries or language features, whereas Scala libraries obviously work well with Scala collection types. Or take Scala's implicits vs React.js context. The latter is what you need to invent when your language has no concept of implicit parameters, and it's a poor, library-specific, substitute.