Top
item
Advertisement

Scala.js lets you compile Scala to JavaScript

March 18, 2015

Via: itCurated

Scala “is no longer essentially a single-host language”, Odersky said. “Now, essentially Scala.js is a grown-up language. People use it for production code”. Part of the Scala project, Scala.js, also is high-performing, he added.

“In quite a few benchmarks, Scala.js beats native JavaScript, which is quite remarkable. And it also deploys very, very fast”, as well as offering type safety and interoperability with JavaScript libraries.

To boost platform independence for Scala on both the Java and JavaScript platforms, Odersky has proposed the Tasty file format, with Scala code compiling the same on both Java and JavaScript platforms. “The Scalac compiler, pronounced “Scala C” would essentially compile into Tasty and then depending on what your platform is, you would produce the JavaScript or the class files”, he said.

Read More