> I would prefer to have HKTs and typeclasses, so I may implement my own IO monad.
I'm not a Java developer, and I haven't even read about higher kinded types or typeclasses (the theory side of programming is my weakness); but you picked my curiosity with this.
Can you elaborate how concurrency done this way would look in Java?
Loom is useful as an underlying mechanism for an IO monad. What I mean is that Java as language still lacks important features so they have to deliver half-baked things like that "structured concurrency". From my point of view these new abstractions are evil - the better ones were out there for a while.
For monofunctors: reliable error handling, an ability to re-interpret the same IO structure multiple times, better reasoning during refactorings due to referential transparency.
For bifunctors: the above plus explicit domain (expected) error encoding and even more reliable error handling.
That's another huge effort which delivered us an imperfect abstraction.
I would prefer to have HKTs and typeclasses, so I may implement my own IO monad.