Live data from Hacker News

From first principles: Why I bet on Scala.js

lihaoyi.com

51–60 of 90 posts

Re: From first principles: Why I bet on Scala.js

#51

Earlier quoted context omitted.

How does scala get embedded in the browser? I can't seem to find it on that document? I know you can use asm.js but it looks like they're not using asm.js

What do you mean? It gets compiled to vanilla JS. You can use sourcemaps to link to your original source file for debugging as well.

I was looking for this:

>It gets compiled to vanilla JS

thanks

Re: From first principles: Why I bet on Scala.js

#52
post #42

Earlier quoted context omitted.

The huge difference is that Scala.js is production-ready, the other ones mentioned aren't.

By what measure is Scala.js more production ready than ghcjs?

I feel like you've not seriously used each of them. Ghcjs is very interesting, but also very, very early. The ecosystem is tiny, the compiler produces huge and slow builds, the interop is tricky, the semantics imperfect. It may be a very long time before any of those are resolved, too! Compiling a lazy language to Javascript is no simple trick. Luite deserves all the praise in the world for getting it this far... but there's just a long way to go.

So, in the terms of this article, Ghcjs might be around the same place Scala.js was 2 years ago. In the mean time, Scala.js has taken off in a lot of ways. It's yet to be seen what will happen with Ghcjs.

Re: From first principles: Why I bet on Scala.js

#53

It's a little strange that ClojureScript is omitted from the sections where it compares favorably to Scala.js, e.g.: > If you look at other compile-to-JS languages like: > - Google Web Toolkit which lets you compile Java to Javascript, > - The Opal Ruby Compiler for Ruby > - Brython, PyJS, Skulpt, Transcrypt or RapydScript for Python > - Various flavors of C#-to-Javascript (Salterelle, Bridge.Net, JSIL) > - Or Haskel…

Except for: types. That's a big deal about what the author liked about Scala.js.

Re: From first principles: Why I bet on Scala.js

#54
post #28

Earlier quoted context omitted.

What do you think of Dart? I need to know this for reasons I can't go into.

Never used it but it seems like a plausible project; it has Google's infinite $$$ backing it and smart people like Gilad Bracha on the team. They've built up quite a lot (language, tools, package-manager, IDE, ...) from scratch which is pretty impressive. As a language, it seems pleasant: somewhere around C#, a mix of JS and Java, less "powerful" (or less "crazy" depending on how you look at it) than Scala. I think I…

I was full in for Dart but Scala.js has been one of those alternatives that seemed more viable. Thanks!

Re: From first principles: Why I bet on Scala.js

#55

Scala is a cool language, but I can't help feeling that Javascript has a very strong culture around it that pretty much dooms adoption of things that don't feel "Javascript-y". I think the strong commitment to being a Javascript superset is the reason Typescript is blowing up the way it is.

absolutely agree. they nailed it by repurposing any js dev as a potential ts user. part of the reason ill be pushing ts soon at my current position.

Re: From first principles: Why I bet on Scala.js

#56
post #53

It's a little strange that ClojureScript is omitted from the sections where it compares favorably to Scala.js, e.g.: > If you look at other compile-to-JS languages like: > - Google Web Toolkit which lets you compile Java to Javascript, > - The Opal Ruby Compiler for Ruby > - Brython, PyJS, Skulpt, Transcrypt or RapydScript for Python > - Various flavors of C#-to-Javascript (Salterelle, Bridge.Net, JSIL) > - Or Haskel…

Except for: types. That's a big deal about what the author liked about Scala.js.

It wasn't mentioned as a criterion, and OpalRuby, Python variants, and Coffeescript all got significant discussion in the article. The ClojureScript omission on all the axes other than "superficial similarity to JavaScript" is still pretty glaring.

Re: From first principles: Why I bet on Scala.js

#58
post #3

I wrote this; ask me anything

Which resources (books/tutorials) do you recommend for learning Scala.js for someone who does not know Scala or Java or any JVM language, but knows a decent amount of Python, Julia, Go, Javascript, Dart etc. I should add that I am not interested in JVM (at least, now). I want to know what are good resources if one intends to use Scala only for the JS side of things.

Re: From first principles: Why I bet on Scala.js

#60
post #53

Earlier quoted context omitted.

Except for: types. That's a big deal about what the author liked about Scala.js.

It wasn't mentioned as a criterion, and OpalRuby, Python variants, and Coffeescript all got significant discussion in the article. The ClojureScript omission on all the axes other than "superficial similarity to JavaScript" is still pretty glaring.

It was mentioned as a criterion. Actually, multiple:

    - "Perfect IDE support" when described hinges on types
    - "Static Optimizability" specifically mentions enjoying 
      type-driven AOT optimizations
    - "Solving Real Problems" mentions types in the 
      "Refactoring is Painful", "'Non-trivial' abstractions",
      and, briefly, in "Scala.js Solves Real Problems"
Furthermore, all of OpalRuby, Python, and CoffeeScript were explicitly dinged on their failures to have statically analyzed types.

But yeah, it does feel like he didn't give ClojureScript as much examination.

Post reply on HN