The Great Concurrency Smackdown: ZIO versus JDK by John A. De Goes

Damien Cooke damien at smartphonedev.com
Sun Mar 12 05:01:32 UTC 2023


Eric,
Thanks for sharing this. I really enjoyed it.  He had a great
conversational style and he had some great points.  However, his
information on Loom seemed incomplete or outdated at times. There were
quite a few but for me, One glaring inaccuracy was his comments about
structured concurrency.  In loom it is every bit as simple and concise
as ZIO consider this:

try (final var executor = Executors.newVirtualThreadPerTaskExecutor())
{
    executor.submit(() -> System.out.println("virtual thread 0"));
    executor.submit(() -> System.out.println("virtual thread 1"));
}

could anything be more concise than this?  We know all threads have
finished once the scope exits.

I also think it was a pointless exercise anyway as they are not
competing products, if ZIO was a library you could use in Java there
might have been a point but ZIO is a library for Scala.  Great, I am
not going to learn a new language just so I can use ZIO.  I would learn
Scala because it was the right tool for a particular job and certainly
use ZIO if concurrency was part of that project, however, Java's
concurrency tools were quite robust even before Loom, Loom just made
them much much better.  I would not use Scala over Java just so I can
use ZIO. 

Regards
Damien



On Fri, 2023-03-10 at 14:57 -0800, Eric Kolotyluk wrote:
> The Great Concurrency Smackdown: ZIO versus JDK by John A. De Goes
> I would recommend this presentation as interesting, worth watching.
> However, I found a lot of problems with the arguments, and while John
> De Goes knows a few things about Loom, his knowledge is incomplete
> and out of date. On the other had, he does make a few interesting
> claims about Zio that might be nice features in Loom some day. In
> particular, the for-yield structure in Scala and Zio is a very
> powerful structure, although can be quite cryptic to fathom,
> especially by the most clever in the Scala community.
> I will withhold my other insights and questions until people respond
> to this, showing interest in further discussion.
> Cheers, Eric
>  



More information about the loom-dev mailing list