Live data from Hacker News

Announcing Scala.js v0.1

scala-lang.org

81–90 of 90 posts

Re: Announcing Scala.js v0.1

#81

This is a game changer. I've used it over the last few 3 or 4 months, and it is really stable and usable. I am betting an entire (although academic) project on it: http://proofpeer.net (note that Clojure is mentioned there as a language of choice, but I switched to Scala since then as Scala provides a similar level of conciseness with all the goodies of a powerful static type system with support for both Java and Jav…

I like static typing, but do you ever get the feeling that we've collectively gone off the deep end with the whole backwards compatibility hacks that compile-to-javascript languages represent? Think about it...we have implementations of static languages on top of a dynamic runtime that translates it back to a static runtime. We have non-GC languages that have developed ways to compile to a GC language and avoid GC. I…

Indeed. It's almost as if the ECMA should just freeze all JavaScript development, and replace it with a standard, low level, high performance compiler target that all browsers can implement instead, and then just let the industry/community write competing compiled languages for it. That's essentially where browsers are heading anyway with asm.js and NACL.

For everyone who still loves JS and prefers it over Coffee/Type/Clojure/etc-scripts, just make a JS compiler and keep all its quirks and wtfs.

Re: Announcing Scala.js v0.1

#82

Too bad that there is not more effort on Scala.NET instead of this. Lots of people are comfortable with writing Javascript in the browser so all of these compilers emitting Javascript end up being little more than a technology demo. But Scala on the .NET vm would really fill a gap.

IIRC, Scala.NET was basically killed by the fact that .NET reified generics and Scala's generics are pretty fundamentally incompatible, which means a .NET implementation of Scala would either not be very Scala or not have a good .NET interop story.

Re: Announcing Scala.js v0.1

#83

Too bad that there is not more effort on Scala.NET instead of this. Lots of people are comfortable with writing Javascript in the browser so all of these compilers emitting Javascript end up being little more than a technology demo. But Scala on the .NET vm would really fill a gap.

Why would you need Scala on .NET when you have F# and C# that are completely the same thing.

Neither F# nor C# are "completely the same thing" as Scala.

Re: Announcing Scala.js v0.1

#84

As someone who doesn't really know anything about scala, why is this a cool thing? While such an early release is definitely aimed at scala enthusiast, I'd still like a sales pitch for the rest of us.

I'm sure this is going to read as dickish, but I personally would be much more inclined to give a thoughtful response if your question showed some evidence of you having attempted to explore this question before asking other people to spoon feed you answers.

This is really one of those questions that _requires_ someone to spoon feed you the answer.

He is asking a Scala expert to describe how a port to JavaScript allows developers to take advantage of advanced Scala language features or tools. The alternative is spending hours working with Scala and coming up with the answer himself.

Being a discussion forum, I don't see why you have a problem giving away knowledge freely over HN.

Re: Announcing Scala.js v0.1

#85

This is a game changer. I've used it over the last few 3 or 4 months, and it is really stable and usable. I am betting an entire (although academic) project on it: http://proofpeer.net (note that Clojure is mentioned there as a language of choice, but I switched to Scala since then as Scala provides a similar level of conciseness with all the goodies of a powerful static type system with support for both Java and Jav…

I also keep thinking of it as a game changer. Why ever bother with prototypes again when you have case classes, or callbacks when you have function shorthands. I fully expect Scala.js code to be more concise and maintainable than Javascript code, and will probably perform better too thanks to the Closure compiler.

Re: Announcing Scala.js v0.1

#86

This is a game changer. I've used it over the last few 3 or 4 months, and it is really stable and usable. I am betting an entire (although academic) project on it: http://proofpeer.net (note that Clojure is mentioned there as a language of choice, but I switched to Scala since then as Scala provides a similar level of conciseness with all the goodies of a powerful static type system with support for both Java and Jav…

I like static typing, but do you ever get the feeling that we've collectively gone off the deep end with the whole backwards compatibility hacks that compile-to-javascript languages represent? Think about it...we have implementations of static languages on top of a dynamic runtime that translates it back to a static runtime. We have non-GC languages that have developed ways to compile to a GC language and avoid GC. I…

Not at all, there is a great deal of precedence in computer science for building durable interfaces on top of unstable ones.

Re: Announcing Scala.js v0.1

#87
post #67

Too bad that there is not more effort on Scala.NET instead of this. Lots of people are comfortable with writing Javascript in the browser so all of these compilers emitting Javascript end up being little more than a technology demo. But Scala on the .NET vm would really fill a gap.

Why would you need anything on .net which already runs on the JVM? Is there any platform where you can install .net but not the JVM? Or does .net have a significantly better performance than the JVM?

Imagine a polyglot project where some major .Net libraries are already in use, but ongoing development or integration was done in Scala.

I'm not saying it's a good idea, but there's a use case there.

Re: Announcing Scala.js v0.1

#88

Earlier quoted context omitted.

Take a look at Kotlin ( http://kotlin.jetbrains.org ), it was designed to address the issues you mention.

Kotlin seems like a lightly stripped down Scala.

Lightly? I'd say one of the most important features were removed - implicits and most of the typesystem magic. Kotlin feels just like Java with lambdas, better null checking. slightly improved generics and some minor syntactic refinements. Most of its "features" will be obsoleted by Java 8.

Re: Announcing Scala.js v0.1

#89
post #22

I remember how years ago I complained about how Javascript was the only language aviable for the web. Nowadays you can even run sliced bread on Javascript... though, wouldn't it be better to focus on developing languages on top of asm.js or PNacl so we wouldn't rely on JS?

Remember to write the slidedbread.js in under 30 lines :)

Re: Announcing Scala.js v0.1

#90

Earlier quoted context omitted.

I'm sure this is going to read as dickish, but I personally would be much more inclined to give a thoughtful response if your question showed some evidence of you having attempted to explore this question before asking other people to spoon feed you answers.

This is really one of those questions that _requires_ someone to spoon feed you the answer. He is asking a Scala expert to describe how a port to JavaScript allows developers to take advantage of advanced Scala language features or tools. The alternative is spending hours working with Scala and coming up with the answer himself. Being a discussion forum, I don't see why you have a problem giving away knowledge freely…

I've got no problem at all answering people's questions, if you look at my comment history. I just think this particular question was both vague and lazily written. It's natural that a question requires more effort to answer than to ask, but a thoughtfully asked question clues potential answerers into what the asker already knows and has already attempted to do to educate themselves. Like "I know Scala is X and Y, but why would these things be useful on the browser side?" or if you don't know anything about Scala in the first place, "I read Wikipedia about Scala but didn't understand Z, could someone explain this?"
Post reply on HN