Settings

Theme

What Scala has to offer for Java devs

softwaremill.com

4 points by AzzieElbab a year ago · 3 comments

Reader

PaulHoule a year ago

Personally I think not a lot. Before JDK 8 maybe, but since then Java has steadily been improving in every direction.

There was a certain phase in my career where it seemed everybody I was working for or with had attempted to do parallel calculations in Scala with actors and found they were only using 2 of the 8 CPUS they had and that they still had race conditions. Your choice was to waste two days trying to make it work in Scala or to rewrite it with ExecutorService and have it done in 20 minutes.

  • AzzieElbabOP a year ago

    I've seen people do this a lot. You have to tell Akka/actors which executorService to use. Actors are just a messaging/mailbox abstraction over threads/pools inspired by Erlang. Akka should use a work-stealing service by default, depending on the version, which might explain why non-blocking calculations used only two threads.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection