First of all, if you watched the slides, you just ran the first `hello world` Scala-js app in your browser. The slides use the scala-js runtime. Developer tools have scalajs-runtime.js at 1.7MB compressed and about 4s to download/execute, then about 1.5s on subsequent refreshes.<p>Now, having seen the talk at Scala days here are a few notes/thoughts:<p>This is currently the result of 4 months worth of work, and Sébastien Doeraene, the author of the slides and the code there-in, is going to be working on it at EPFL for the next 4 years or so for his doctorate.<p>This is being done by replacing the backend portions of the Scala compiler that emit java bytecode with ones that emit javascript.<p>When the slide showing that it is 16MB came up everyone laughed and the author acknowledged how large a number this is. It is the result of having to bring in the entire the Scala standard lib. He is planning to work on ways of cutting this number down.<p>At the end of talk Martin Odersky commented from the audience that this is an attempt by the EPFL at making Scala useable for large webapp development. If it proves successful more resources will put towards supporting it.<p>I plan to try this out for internal sites used by my company. Currently we split and then have to duplicate a lot of our code between Scala / Javascript. Scala for the server software, Javascript for frontends which are webapps. I haven't had time since I got back to do much more than clone the git repo.
16MB minified. Ok; for what?<p>"How to scale to Rich Internet Applications?"<p>Good question. They didn't answer it. Is the Scala code going to be much more compact? And what problems scaling JS to rich applications were they thinking of, exactly? They don't say.
16MB runtime is really painful. Having to pack a huge amount of the standard library (List is backed by a lot of other traits for example) into the js is going to be very difficult to reduce.
While in principal, I love this... Because JS is not my favorite language... I just don't see the real world benefit. It's going to:<p>1.) increase difficulty debugging (compiled js -> scala)
2.) decrease productivity, see #1<p>Why not just write javascript? Though that's my argument against any of these compile to js kits (coffee script being the big one). So maybe I'm just trolling (sorry).<p>Again, super cool. The author is waaay smarter than I for implementing this, but... The real world.
I enjoy both javascript and scala.<p>For work and anything I would want to put on a web site it is more practical to write javascript and when I've had time for my own projects I've enjoyed scala.<p>For me this is a great direction. The idea that I'd suddenly replace my javascript is silly. But being able to pull in things I'm familiar with from both into the same prototype (and at the same layer) of something and debug it all in the debugger I'm most familiar with (and with correct code line references!) is awesome.<p>Similarly, for someone who is learning scala and doesn't have/want java+IDE experience, this could lead to learning scala as a language with much less overhead and/or while learning a more useful combination of debugger and editor.<p>I think the overly negative comments come from those who view javascript as the "problem" that every new way to integrate languages with it must have been designed to tackle. Since every language has trade-offs, there is always ample criticism available from that vantage point...
Interesting! Maybe it can learn from Scala on Android:<p>For Android development, install Scala runtime into rooted phone, so you don't need to "minify" your code (faster roundtrip). For Scala.js, maybe use Chrome Extension?<p>For production, ProGuard (removes unused code in Scala) and Closure Compiler (optimizes JS).
I have not used Scala before. What's the motivation for this? I can think of two reasons - a) to make native Scala programmers feel home with Javascript and b) Scala is a superior language than Javascript, will therefor make many things easier.<p>How much of this is (b)?
I think that this is a great project, and would be exactly what I need for ProofPeer (<a href="http://www.proofpeer.net" rel="nofollow">http://www.proofpeer.net</a>) because I have lot's of code that needs to run both on the server and in the browser. I am using Clojure/Clojurescript currently and am pretty happy with it. But I am missing the possibility of defining abstract datatypes in Clojure, so my first choice would have been Scala if Scala.js would already be mature and reasonably production ready.
The video recording is now available!
<a href="http://www.parleys.com/play/51c380bfe4b0ed8770356866" rel="nofollow">http://www.parleys.com/play/51c380bfe4b0ed8770356866</a>