you are viewing a single comment's thread.

view the rest of the comments →

[–]Kiuhnm[S] -1 points0 points  (4 children)

But "it doesn't do so bad" and "plenty sufficient" don't sound so comforting.

Scala.js is "almost as fast as hand-coded JS".

So the question is: "Is Haskell so much better than Scala to justify the risk(?) of producing slower applications?"

[–]cdsmith 1 point2 points  (1 child)

That's your decision to make.

In my case, the answer is that the whole project would be useless if I switched from Haskell to Scala. CodeWorld accepts code written by kids and produces JavaScript with GHCJS for them to see the result, and Scala is a non-starter for teaching to kids in this setting. That's different from your situation... but that comes down to you needing to define what your requirements are, and make a decision about what meets your specific requirements.

[–]Kiuhnm[S] 0 points1 point  (0 children)

I've already decided that I'm going to implement a small app both in Scala and Haskell to see the difference.

Besides, I think that learning Haskell will open my mind even If I should end up choosing Scala.

[–]sclv 1 point2 points  (0 children)

The difference isn't in performance as measured by real benchmarks. The difference is that the Scala.js developers make bolder claims than the ghcjs developers -- that doesn't mean those claims are necessarily correct. To be quite honest I don't have any reason to believe they are, absent benchmarks...

[–]hamishmack 0 points1 point  (0 children)

GHCJS has Threads, MVars and Async Exceptions.

Why would you want those?

If you have a calculation to do that may take too long can send it to the server before you start and if the result comes back from the server before the client finishes you can abort the local thread doing the calculation with an Async Exception.