@igallegosagas

Very good article by @adamwarski
[ 1 reply ]

Scala

SoftwareMill
The future of effects in Scala?
But as it turns out, there's no consensus as to what the problem actually is!
...
Instead, the proposal introduces suspend functions and continuations, which allow programming in a direct style, while keeping the above mentioned features of the monadic style.
...
However, I think there's one deeper issue before accepting it as a SIP and incorporating it into Scala.
...
Should the signature of the method indicate that it performs side-effects?
...
finally, Martin Odersky is starting a research program, Caprese to investigate possible ways to track effects in Scala, so this might yield new options.
...
Should the information about the effect propagate to callers all the way up to the boundaries of the application, or should it be eliminatable?
...
However, this isn't useful anymore on a JVM 19 runtime, which includes Loom.With Loom, most operations that have been run asynchronously for performance can now be run synchronously (even if behind the scenes, on a low level, an async implementation is used).Hence, tracking asynchronous operations in the type system no longer makes sense.
...
Another candidate, proposed by Martin Odersky is to track suspension points.
...
Finally, my proposition would be to track remote calls.
...
An important note here: not all participants of the discussion agree that it's really a problem; see for example this post by Li Haoyi.
...
John de Goes argues that we shouldn't focus on tracking effects, as such an approach is "commercially useless".
...
Instead, John proposes composable error handling as a solution.
...
Finally, an important part of the discussion has been taken by the impact of the upcoming Loom project, which will be previewed in JDK 19.Loom implements lightweight (virtual) threads on the JVM, making it possible to quickly start thousands of them, without the overhead that has been present so far.
...
Why would this concern Scala?The primary platform on which Scala is used, is the JVM.
...
In fact, the prototype suspend functions implementation mentioned in the proposal is based on Loom!
...
See also my article from two years ago where I try to investigate the topic a bit deeper: Will project Loom obliterate Java Futures?
...
Ultimately, it's up to the Scala stewards - Martin Odersky, EPFL, and the Scala Center - to decide which road Scala will take.
...
As always, exciting times for all Scala developers out there :)
[
]
agree @igallegosagas his stuff is pretty great

cc @micshasan
[ post ]