My last couple of projects have mostly been written in Scala and I’ve really started too love the language as I became better and better at it. Once you’ve fully experienced the joy of proper type safety, you can’t go back.
You can keep using your build system and IDE. Everything worked out-of-the-box.
The compilation process is not slower than the compiler that targets the JVM. However, the Scala compiler is quite slow but you get used to it because it really helps you during development. Those sweet, sweet types are great!
The compiler produces unreadable code which will make debugging harder.
I’ve read that source maps are available, but I haven’t been able to make them work
yet. Source maps do work and can help you debugging!
It’s rather small, but that shouldn’t surprise you since ScalaJS has only come out of beta a few weeks ago. You should expect to write stuff yourself because it doesn’t exist yet.
This is currently a weak spot. Obviously, you can use the fantastic Scala core library which to me is one of the main appeals. I haven’t found out how easy it is to get third party libraries like, say, Joda-Time working.
On the DOM side, there is the nice scalatags which makes writing HTML typesafe but other than there isn’t all that much around.
The community seems to be split between people wanting to wrap native JS frameworks like React and others wanting to write stuff from scratch in pure Scala.
I think we will see a lot of experimentation of approaches and many new frameworks popping up and eventually dieing. This isn’t something that worries me a lot since this is the way that really make a community thrive. Yes, it does cause fragmentation to a certain degree but I feel that it’s a price worth paying for finding the best ideas and practises.
In short: it’s acceptable. With fast optimisation my dummy app clocked in at ~600kb. A full optimisation brought that down to around 140kb. Really large apps probably will be a few MB, but that’s not something unheard off with apps written in native JS, too.
I’m very excited about ScalaJS and I think it’s very promising. It gets a lot of things right and people are working on the things that aren’t so great yet.
I might sound like a fanboy, but most things coming out of the Scala ecosystem these days are very high quality and this is no exception.
If you can tolerate a little technological immaturity and don’t mind being an early adopter, I would seriously consider ScalaJS for you next frontend project.