Live data from Hacker News

Announcing Scala.js v0.1

scala-lang.org

51–60 of 90 posts

Re: Announcing Scala.js v0.1

#51

Earlier quoted context omitted.

I completely agree. While asm.js has its problems, its moving in the right direction. Honestly, it seems like this wouldn't be too hard to add a backend target for asm.js, if its implemented well.

Note that asm.js (and probably PNaCL as well) currently offers very little for languages like Scala that need good GC. Until that's addressed simply targeting JavaScript is going to be best approach for these languages.

I don't think running a garbage collected languages on asm.js will ever make any sense (since it would mean implementing and shipping your own GC as part of the application source). So, yeah, you're right. Scala (as-is) is not a good language to target any of the "native" targets like asm.js.

Re: Announcing Scala.js v0.1

#52

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.

What niche do you see Scala filling on .NET that isn't already handled by F#?

Case in point, .NET already has FunScript, an F#-to-JS compiler: http://funscript.info/

FunScript also provides a way to do strongly-typed interop with TypeScript, via F#'s type providers.

Re: Announcing Scala.js v0.1

#53
post #50

Earlier quoted context omitted.

I used to wish for this also. But then I found C# to be pretty good; maybe it doesn't have as many features as Scala, but it is definitely a step up from Java. The demand for Scala on .NET just doesn't seem to be that large, couple with the fact that reified generics make encoding Scala directly kind of difficult (Nikolay Mihaylov spent a lot of time on that).

>> But then I found C# to be pretty good; maybe it doesn't have as many features as Scala, but it is definitely a step up from Java. I left C# to do Java, Java is a step up from C#.

How so? I started out in Java, then did a lot of Scala for a couple of years, and have been mainly working in C# for the last 6 years afterwards. The only things I miss from Java are anonymous inner classes and some of the better debugging features (hot code replace) that Visual Studio hasn't really matched yet (edit and continue is not as robust).

I miss many things from Scala in comparison, but C# has some good features that almost make up for it.

Re: Announcing Scala.js v0.1

#54

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.

What niche do you see Scala filling on .NET that isn't already handled by F#? Case in point, .NET already has FunScript, an F#-to-JS compiler: http://funscript.info/ FunScript also provides a way to do strongly-typed interop with TypeScript, via F#'s type providers.

F# is primarily functional, Scala is much more of a hybrid of both OO and FP; so Scala has things like traits that are actually advanced OOP constructs, while F# tries to push you more in the direction of pure FP.

The tradeoffs are different also. F# focuses a lot on performance in the spirit of Caml, whereas Scala is a bit more free to dive into more powerful features that go against that spirit. This is my grock at least of my conversations with Don and Martin over lunch when Don was doing his sabbatical at EFPL.

Re: Announcing Scala.js v0.1

#55
post #47
post #44

Earlier quoted context omitted.

Mmmmm basically I think it's because Scala itself is in a really captivating position, so seeing these utilities emerge makes it that much more promising. I've switched from RoR to Scala on Play framework and at this point it's one of those things where you use & say "this is sick " but are still discouraged because the community is so small in comparison. But with Akka, with the Typesafe Console & other niceties you…

In my mind, Akka is the reason to use Scala right now. Actors are an incredibly powerful abstraction for building highly-concurrent, highly performant systems and the features Akka brings along—remoting, clustering and now event sourcing—make it a fantastic tool for these applications. But then, I'm a backend developer and Akka is more useful in that realm. Play still needs some work IMO. It's great if you need the r…

yeah i agree it may not be ultra-streamlined for rapid application development yet, but i don't have any critical work i need to do with it. to me it's really just an excuse to learn Akka. When I read about Netflix's async Java libraries (RxJava I think its called) I realized how the Java world really has an edge in making advanced web apps.

The more polished frameworks are better for building apps quickly, sure, but as a technically-oriented developer (I am full-stack, usually above DSL) I'm more interested in making my mark by understanding some useful persistence/eventing/concurrency stuff. If we can master this, I believe it will be the thing that finally brings a unified model to web app development that simplifies the entire end-to-end flow without requiring redundant code or limited choices about persistence scopes.

It's strange that they don't have some scaffolding and authentication features, but as you said they'll come in time. It's just odd because they are on the more trivial end of the toolset.

But that doesn't turn me off and maybe that's the point. It's not really meant for someone trying to make a CRUD app. Sure it should and will be able to do this well, but to me the JVM is the place where people are really trying to dig past CRUD and get to some novel data-and-event-driven apps.

Lucky for me this is something I'm learning as a hobby so I don't have to support production-level apps with it anyway. But yeah to me it feels like they've taken a lot of the attractive features of Django/RoR and backed them with some more serious language features. This may be a bit delusional since I guess Ruby & Python are legitimate in their own right, but.... well, as you can tell, I'm more excited for a JVM language to try to introduce stronger modern design patterns into the framework world. MVC on it's own is dead & done (er... solved), it's the extra unifying logic layers that are more important now.

Re: Announcing Scala.js v0.1

#56
post #9

Earlier quoted context omitted.

Is this supposed to be ironic? Considering JSON.parse( {a: "B"} )

JSON is always going to be a bit more difficult to parse in statically typed languages than dynamically typed ones. The amusing part is that most APIs use JSON as if it were statically typed - except for null/undefined, very few APIs return values of more than one possible type for a given key[0]. It doesn't always have to be so bad, though, even in statically typed languages. For example, I created a tool in Go to a…

Incidentally, the one place I often have to deal with values of different types for the same key is from a java app that is poorly converting XML -> JSON and converts a list with a single element into just the element.

Re: Announcing Scala.js v0.1

#57

Fun stuff, but again, doesn't come with any tools. Microsoft Typescript is much better on that matter. What javascript universe needs right now is not some more of syntactic sugar clusterfuck followed by debugging nightmare, but real tools, static code analysis. I don't want to waste my precious time dealing with closure compiler+scala something combo. It's fun from programmers POV, but still it won't make me pay my…

Scala is outside of reality, it's academic diarrhea.

It's nothing but syntactic sugar (more like salt) for Java's async functionality and we all know that anything made from shit is expected to be shit.

Re: Announcing Scala.js v0.1

#58
post #47
post #44

Earlier quoted context omitted.

Mmmmm basically I think it's because Scala itself is in a really captivating position, so seeing these utilities emerge makes it that much more promising. I've switched from RoR to Scala on Play framework and at this point it's one of those things where you use & say "this is sick " but are still discouraged because the community is so small in comparison. But with Akka, with the Typesafe Console & other niceties you…

In my mind, Akka is the reason to use Scala right now. Actors are an incredibly powerful abstraction for building highly-concurrent, highly performant systems and the features Akka brings along—remoting, clustering and now event sourcing—make it a fantastic tool for these applications. But then, I'm a backend developer and Akka is more useful in that realm. Play still needs some work IMO. It's great if you need the r…

Have been using Play for a couple of years now.

In regard to missing components, the goal is not to provide the kitchen sink, but rather the tools to build your house.

This is where RoR, Django, etc. differ from Play. Play just provides the basic MVC stack along with essentials like, modular routing (AKA sub projects), excellent form generation and validation, http request wrappers (AKA action composition) for say, authentication ;-), an OK template layer (could be better, generics not supported), etc.

Agreed, Play will not give you the rapid fire dynamic language based framework development experience, not while getting your feet wet at any rate.

On the flipside, you've got the JVM ecosystem at your finger tips, a static type system backing your every (errant) move, blazing fast performance in production, and general zero-stress on deploy, the shit just works.

Re: Announcing Scala.js v0.1

#59

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.
Post reply on HN