Live data from Hacker News

Scala.js - Write in Scala for the browser

lampwww.epfl.ch

1–10 of 33 posts

Re: Scala.js - Write in Scala for the browser

#3
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:

1.) increase difficulty debugging (compiled js -> scala) 2.) decrease productivity, see #1

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).

Again, super cool. The author is waaay smarter than I for implementing this, but... The real world.

Re: Scala.js - Write in Scala for the browser

#4
post #2

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.

Yeah, and I'm not sure scala will be that useful without the standard libs, much like C# or Java.

Seeing the presentation, I'm thinking more of using it with something like node-webkit[1] though. Didn't LightTable use clojure-script or something? But then, why don't just use one of JVM's GUI framework?

[1]: https://github.com/rogerwang/node-webkit

Re: Scala.js - Write in Scala for the browser

#5

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: 1.) increase difficulty debugging (compiled js -> scala) 2.) decrease productivity, see #1 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). Again, super cool. The autho…

It will be long before someone implement this in the real world (website). It needs 16MBs download for the standard libs. Even twitter only downloads around ~2MBs before showing page.

Re: Scala.js - Write in Scala for the browser

#6
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.

How much of this is (b)?

Re: Scala.js - Write in Scala for the browser

#7

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: 1.) increase difficulty debugging (compiled js -> scala) 2.) decrease productivity, see #1 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). Again, super cool. The autho…

I can only speak for clojurescript, but I'm ok with trading off some debugging pain for way better semantics / nicer code.

Re: Scala.js - Write in Scala for the browser

#8
post #4
post #2

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.

Yeah, and I'm not sure scala will be that useful without the standard libs, much like C# or Java. Seeing the presentation, I'm thinking more of using it with something like node-webkit[1] though. Didn't LightTable use clojure-script or something? But then, why don't just use one of JVM's GUI framework? [1]: https://github.com/rogerwang/node-webkit

I'm doing something for fun with Clojurescript and node-webkit and for me it's mostly that I want the fast start up time, but also to get to just work with html instead of having to learn a gui framework.

Also I just want to mention that Clojurescript compiles to javascript that's compatible with Google's Closure compiler, which can do dead code elimination and will remove the parts of the standard library that you don't use.

Re: Scala.js - Write in Scala for the browser

#9

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: 1.) increase difficulty debugging (compiled js -> scala) 2.) decrease productivity, see #1 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). Again, super cool. The autho…

[deleted]

Re: Scala.js - Write in Scala for the browser

#10

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. How much of this is (b)?

I've used javascript for many many years and, as of 6mo ago, started using Scala (I do a lot of distributed programming on hadoop, storm, and recently spark). Scala is now one of my favorite languages because of Spark (http://spark-project.org/). Scala very nicely blends the functional and imperative styles and it always favors programming without side-effects. Anything you can do in java you can do in fewer lines and you will see fewer bugs.

That said- it's not a superior language, just a different paradigm. With Scala you get very strong typing, functional constructs (so incredibly powerful), matching, options, very clean closure syntax, etc.. You'll eventually fall in-love with _, too.

I haven't used scala.js yet, but here are some downsides to Scala proper: * slow the compile * tooling isn't great (this true of anything jvm to some degree though)

Post reply on HN