Live data from Hacker News

Scala.js - Write in Scala for the browser

lampwww.epfl.ch

11–20 of 33 posts

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

#11
Interesting! Maybe it can learn from Scala on Android:

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?

For production, ProGuard (removes unused code in Scala) and Closure Compiler (optimizes JS).

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

#13
16MB minified. Ok; for what?

"How to scale to Rich Internet Applications?"

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.

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

#14

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…

> tooling isn't great (this true of anything jvm to some degree though)

Well, you have plenty of very decent tools to inspect a running JVM state, and that's priceless. Eclipse is alright if you manage to set it up once with the tools you need and don't fiddle with the setup afterwards. Although slow, it packs a lot more features out of the box than Visual Studio. The debugger is pretty good too (including remote debugging).

If you compare it to state-of-the-art tooling for more fringe languages like Python or Haskell, it's lightyears better, really.

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

#16
post #13

16MB minified. Ok; for what? "How to scale to Rich Internet Applications?" 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.

Definitely a strange mindset. How does JS not scale to rich applications? I'd rather use modular JS and a MV* framework than try to use GWT equivalents or things that compile to Java from other languages where the idioms don't translate.

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

#17
post #16
post #13

16MB minified. Ok; for what? "How to scale to Rich Internet Applications?" 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.

Definitely a strange mindset. How does JS not scale to rich applications? I'd rather use modular JS and a MV* framework than try to use GWT equivalents or things that compile to Java from other languages where the idioms don't translate.

[deleted]

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

#20

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…

Current version of Scala is definitely superior to current version of JS in terms of quality of implementation. ECMA 6 is a different story.
Post reply on HN