News for hackers. Stuff that matters.
Re:Advanced programming languages (2009) by phamilton on Sunday June 19, 2016 @12:31PM (#11933505)
Scala's JVM support can get rough. Many a developer had gone down the road of finding a library like a db driver and using it in Scala. This works fine until you deadlock your production system because your execution context ran out of threads because your db driver blocks.

So yes, while you can use Java libraries you often have to jump through a lot of hoops.

Re:Advanced programming languages (2009) by justinhj on Sunday June 19, 2016 @12:37PM (#11933531)
Scala makes it really easy to call a blocking function using a future with a configurable execution context. I don't see why one would run out of threads. Currently we use the Typesafe supported Slick library but the mechanism is the same.

Maybe I'm missing your point but as a professional Scala programmer I've never run into a problem with Jvm or Java integration

Re:Advanced programming languages (2009) by phamilton on Sunday June 19, 2016 @12:52PM (#11933594)
I've done it naively with a mongo driver. Just wrapping it in a future doesn't cut it, as you said you have to configure a separate execution context and even that context is finite. Or use a blocking future which has other implications.

It's more a point against the "strictly better than Java, use the bits you want as you you go" point in the article. You have to understand Scala's execution model and make sure you are mixing the paradigms properly, because it's fully of leaky abstractions.

Re:Advanced programming languages (2009) by twblalock on Sunday June 19, 2016 @02:46PM (#11934066)
It's also a real pain to call Scala code from Java, which makes blending Java and Scala code in a project, or adding Scala code to an existing Java project, much less attractive.