by jacques_chester · 5y ago · 0 comments
1. I cannot wrap my head around library-based reactive systems. I have tried and tried and continue to try. But they're like some of the original Go4 design patterns: they exist to solve the language, not the problem. Loom's promise to make steam-powered linear code behave mostly like a fully-dressed reactive library system is extremely welcome.
2. Structured concurrency. Among the entries on the thick tablet of hatreds of Golang that I carry upon my heart, mystery action at a distance due to go(to) routines appears infrequently but painfully. Like so many Go features they conspire against composability and testability. Structured concurrency looks like an escape from the madness. Please let it be true.
Plus, sometimes, I want to use Java.
Current reactive code is littered with async/await for every IO function, which feels like they are trying to bolt reactive behavior. Library-based threading model provide the sync thinking with optimized async compute model.
Some resources:
https://wiki.openjdk.java.net/display/loom/Structured+Concur...
https://cr.openjdk.java.net/~rpressler/loom/loom/sol1_part2....
https://vorpus.org/blog/notes-on-structured-concurrency-or-g...
The discussion further down about "scope variables" foreshadows making structured concurrency more strongly, directly supported by the language's runtime:
> What about inheritance? Because SVs are immutable, and because structured concurrency also gives us a syntax-confined thread lifetime, SV inheritance fits structured concurrency like a glove
Here is what the wiki has to say:
https://wiki.openjdk.java.net/display/loom/Structured+Concur...