Scala.js Exits Experimental Stage
Written by Kay Ewbank   
Thursday, 12 February 2015

The developers of Scala.js have dropped the experimental flag associated with their Scala to JavaScript compiler, and updated the version to v0.6.0.

 

scalajs

 

Scala.js has been under development for two years, and the developers say in the blog post about the new version that they finally feel comfortable calling it production-ready. However, it is still not part of the Typesafe Reactive platform, and Typesafe, the company established by Scala creator, Martin Odersky, to promote Scala  does not provide any commercial support for it.

The heart of Scala.js is a compiler from Scala to JavaScript that compiles .scala files to a single optimized and minimized .js file per application. The resulting JavaScript code is vanilla ECMAScript 5.1 so work across operating systems and browsers.

Writing about the new version, the developers point out that just Scala.js offers the Scala language features including type inference, classes, traits and objects, pattern matching, and the Scala collections library. In the same way that Scala is fully interoperable with Java, Scala.js is fully interoperable with JavaScript.

You can use a variety of IDEs to develop in Scala.js, and the developers say that both IntelliJ IDEA and Eclipse work well, and other editors should do so too. The Scala.js tooling gives you syntax highlighting, and the code completion extends to JavaScript libraries and the DOM. The main limitation is that your IDE won’t be able to run or debug Scala.js code, but you can do that in your browser, including stepping through your Scala code because Scala.js emits source maps.

Scala.js has what the developers describe as a growing ecosystem of libraries, which you can depend on via Maven (libraryDependencies in sbt). The libraries cover UI frameworks, statically-typed client-server communication, and reactive extensions. Several popular Scala community libraries such as Shapeless and Scalaz cross-compile with Scala.js.

The decision to remove the experimental flag was made because of several aspects of stability, including the fact that the semantics of the language are settled. The standard library of Scala.js will remain backward source compatible, as will the sbt builds.

The blog says that all things considered:

“this means that the code you write today, for Scala.js 0.6.0, will continue to work throughout 0.6.x and 1.x.y unchanged.”

The main thing that might have to change in future versions is the format of the intermediate files of Scala.js, the .sjsir files. These files are essentially the Scala.js equivalent of .class files for the JVM, and the developers aren’t yet completely certain that the format is settled, hence the decision to call this version 0.6.

Scala.js has its own site, scala-js.org where you can download a standalone distribution and find a tutorial. You can also try Scala.js in the browser in its official sandbox, scala-js-fiddle.com

 

scalajs

 

More Information

Scala.js No Longer Experimental

Related Articles

Scala 2.11 Released

 

To be informed about new articles on I Programmer, install the I Programmer Toolbar, subscribe to the RSS feed, follow us on, Twitter, FacebookGoogle+ or Linkedin,  or sign up for our weekly newsletter.

 

Banner


Meta Releases OpenSource Podcast Generating Tool
28/11/2024

Meta has released an open source project that can be used to automatically convert a PDF file into a podcast. Meta says Notebook Llama can be considered an open-source version of Google's NotebookLM.

 [ ... ]



AI At edX With 30% Savings
13/12/2024

edX is offering a 30% discount on selected courses and program bundles until December 19th. We look at  AI-related certifications that could boost your resume in 2025.


More News

 

espbook

 

Comments




or email your comment to: comments@i-programmer.info

Last Updated ( Thursday, 12 February 2015 )