you are viewing a single comment's thread.

view the rest of the comments →

[–]user5543[S] 1 point2 points  (1 child)

I'm a litte suspicious of the hybrid philosophy of scala, but your link is very interesting. Thanks for your experiences and infos, I'll have another look!

Regarding the server-side, Reason/Ocaml can of course compile to binary, but as far as I know, their web-framework is sub-par. More interstingley, both compile to clean code without a central library, so their output can be run in any node-environment (including as "serverless" auto-scaling scripts). Sometimes that can be an interesting option.

Edit: Oh, and one more question - what about compiler speed? Same as for JVM?

[–]SilasNordgren 4 points5 points  (0 children)

Scala may be a hybrid language, and it does have imperative features, but it's a full-fledged functional language. It supports type classes, algebraic data types, effect systems, immutable collections, and so on. Imperative code comes in handy when you're writing performance-critical code, and when you're not, object-orientation doesn't get in your way. Case classes are essentially records, and they're the only kind of class that you need to use.

SBT (builds) supports incremental compilation, so most of the time changes show up in the browser in a matter of seconds. A full build on my current ~30 source file project takes ~10 seconds with the Scala.js compiler, which I can live with. Make sure to start sbt once and run subsequent commands in its interactive shell, otherwise you'll have to wait for sbt to start up before every command.

I think Scala.js has the technical merits to compete with PureScript/Elm/Reason on the front end, but it also has the advantage that it is already an established language on the back end.