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

Alex Otenko oleksandr.otenko at gmail.com
Sun Mar 12 21:52:57 UTC 2023


The whole pitch is about functional effects, not the ability to spin up a
lot of threads. It is about the ability to express various effects and
combine them. Java lags way behind on this.

Exceptions are not dismissed. "Exceptions" are part of type signature.
Think of Either[ErrorType, ValueType]. Because it is part of type
signature, you get nice support from the language's type system.


Alex

On Sun, 12 Mar 2023, 19:22 Eric Kolotyluk, <eric at kolotyluk.net> wrote:

> Hmmm, 🤔... I have not been paying much attention to the Scala community
> lately Robert as my current job does not use much Scala, so my Scala use is
> just recreational programming at the moment. I did find his presentation
> rather manipulative, which is disturbing, and possibly why he is being
> cancelled.
>
> Damien, I agree with you.
>
>    1. While he eventually acknowledged Structured Concurrency, he
>    introduced late to make Zio look better, and when he did introduce SC, he
>    distorted things.
>    2. His dismissive attitude towards exceptions was also disturbing,
>    possibly because Zio and functional non-blocking systems cannot deal
>    properly with exceptions. Loom on the other hand deals really well with
>    exceptions, and there is a huge investment in libraries that throw
>    exceptions.
>    3. Another thing he did not point out was that Scala can easily use
>    Virtual Threads and Java Structured Concurrency, because I have done so
>    from Scala. In some cases, I prefer Scala because I like Scala Collections
>    better then Java Streams, but that's me.
>    4. I think there are some aspects of Zio I might like to see in the
>    general Java language and libraries, but I am willing to wait. Java has
>    done a great job of learning from the lessons of Scala, and applying those
>    to the evolution of Java.
>    5. Finally, while he did point out the astonishing advantage of Loom
>    making changes to the JVM itself, he played it down, almost as if he was
>    holding a grudge because this is something Zio, Scala, Kotlin cannot do.
>
> My next goal is to play with the Helidon Nima more, to use Loom in real
> projects.
>
> Cheers, Eric
> On 2023-03-12 6:15 a.m., Robert Engels wrote:
>
> Sorry, I should have given more context. It appears the Scala community is suffering from some political??? issues - to the point that the speaker in the cited video has been “cancelled” and disinvited from the upcoming “scalaconf”. Doesn’t bode well for its wide adoption - which was already in decline.
>
>
> On Mar 11, 2023, at 11:02 PM, Damien Cooke <damien at smartphonedev.com> <damien at smartphonedev.com> wrote:
>
> 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
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/loom-dev/attachments/20230312/cdf6ff3d/attachment.htm>


More information about the loom-dev mailing list