Live data from Hacker News

Scala.js no longer experimental

scala-lang.org

111–120 of 135 posts

Re: Scala.js no longer experimental

#111
post #105

The "Hello World" example yields a 3500 LOC js file. I expected a high count but that still managed to shock me. Well, I'm still pretty excited about this announcement and looking forward to give it a try.

The important thing is that it doesn't grow proportionally.

Adding a second line to your "Hello World" doesn't give you 7000LOC, just like using jQuery in two places instead of one doesn't automatically double jQuery's library size.

Re: Scala.js no longer experimental

#112
post #98

Earlier quoted context omitted.

I'm skeptical of any x-to-JS compiler as usually I end up debugging 2 different codes, where the second one is machine generated. After that you try to work around on the first to make the generated one do what you want. On the other hand the Scala people know how to write compilers. We're live, in production, with Scala since 2011 and it's a joy: it actually delivers what's promised. Heard the same thing from Twitte…

Yeah, you could maybe even get the JSX-style syntax with React by using Scala's XML support. I'm not sure if it would actually work, but it's a cool idea.

If you mean XML literals, they're deprecated now. I don't know whether the macroized XML interpolator has landed yet.

Re: Scala.js no longer experimental

#114
post #65

Earlier quoted context omitted.

Reflection is very much the last option when using Scala, as it breaks the ability to statically reason about code.

Yes, I agree. Although using macros is not as easy.

It's getting easier all the time, though. The interpolators (q etc) are great!

Re: Scala.js no longer experimental

#115
post #98

Earlier quoted context omitted.

I'm skeptical of any x-to-JS compiler as usually I end up debugging 2 different codes, where the second one is machine generated. After that you try to work around on the first to make the generated one do what you want. On the other hand the Scala people know how to write compilers. We're live, in production, with Scala since 2011 and it's a joy: it actually delivers what's promised. Heard the same thing from Twitte…

> debugging 2 different codes, where the second one is machine generated. After that you try to work around on the first to make the generated one do what you want. Please forgive me for the accusation, but I've heard many people say this same statement to later found out they just meant "Well it's never happened to me... but it could... but it happened to this person I know...". I personally can't think of many situ…

I've had this happen with Clojurescript. If I recall correctly, runtime errors refer to the generated code, rather than to the source. So it can be hard to diagnose what exactly is going wrong.

This may have changed since I was last working with Clojurescript.

Re: Scala.js no longer experimental

#116
post #98

I was very sceptical of Scala.js, but decided to use it in a low risk project ( http://github.com/underscoreio/doodle ) to render to the HTML canvas and I am shocked at how well it works. The community is moving very quickly as well, and many advanced Scala projects have had the necessary tweaks applied to run in Scala.js. Looking at broader trends, there is a clear movement towards static typing on the Javascript VM…

I'm skeptical of any x-to-JS compiler as usually I end up debugging 2 different codes, where the second one is machine generated. After that you try to work around on the first to make the generated one do what you want. On the other hand the Scala people know how to write compilers. We're live, in production, with Scala since 2011 and it's a joy: it actually delivers what's promised. Heard the same thing from Twitte…

I'm skeptical of any x-to-JS compiler as usually I end up debugging 2 different codes, where the second one is machine generated. After that you try to work around on the first to make the generated one do what you want.

I can't speak to any other x-to-JS transpiler but I've been writing ClojureScript almost every day for close to two years and this has never been an issue. At the very least this has to be dependent on which 'x' we're talking about.

Re: Scala.js no longer experimental

#117
post #36

Earlier quoted context omitted.

Google is developing SoundScript Aren't they doing Dart as well? That has optional typing. Plus they have GWT, which is Java to JS. Don't get me wrong, I'm super grateful to receive their fruits of labor for free, but this looks like a case of the left hand not knowing what the right hand is doing.

You've hit the nail on the head with left-hand-right-handedness at Google. Every interaction I've had with that company reveals behavior reflective of this condition. You've gotta scratch the surface to find it, but lately it's not very deep. When I interview places, and the interviewer gives me a single question, I hit them with something almost no one expects ("If you could change one thing without veto, what would…

When I interview places, and the interviewer gives me a single question, I hit them with something almost no one expects ("If you could change one thing without veto, what would it be?")

I will remember this one. That's a great question for interviews.

Re: Scala.js no longer experimental

#118
post #106

Earlier quoted context omitted.

There just are programmers who feel static typing is the only correct way to program. Google has always been in that camp (company wide directive, I suppose). Meanwhile, most of the internet runs on PHP. I hope it will play out so that the statical types people can use something with statical types, and the dynamic types people can happily continue with their static types.

(disclaimer: super ultra pro-static-types person) I really wonder whether we won't get more conversion to static types. I think the popularity of dynamic typing languages is more due to the fact that static typing used to be a major pain. But with type inference being where it is, I think most languages can start moving to static typing without any costs to the users The biggest representation of this is all the Pyth…

What makes you say "with type inference being where it is"? Have there been recent advancements?

Re: Scala.js no longer experimental

#119
post #106

Earlier quoted context omitted.

(disclaimer: super ultra pro-static-types person) I really wonder whether we won't get more conversion to static types. I think the popularity of dynamic typing languages is more due to the fact that static typing used to be a major pain. But with type inference being where it is, I think most languages can start moving to static typing without any costs to the users The biggest representation of this is all the Pyth…

What makes you say "with type inference being where it is"? Have there been recent advancements?

This is personal impression, but there haven't really been any advances in research per se, but there's been a lot of advances in tooling.

Now having type inference is an "expected" feature of most languages, now that there's a good amount of institutional knowledge. Along with first-class functions and the like. These are old things but it takes a while to propagate

Post reply on HN