Scala does not move in the direction of more monadic IO, but rather in the direction of “direct style”, preferring continuations to monads, but without providing support for continuations out of the box.
Interesting take. I’m personally fine with either style, but I can’t go as far as pretending that the monadic one is ergonomic. I don’t think it’s a great way to develop in general, “Monads don’t compose” is a reality, and having “do-it-all/God Monad” is band-aid for hardly managing to shove everything in a “mother-of-all” for-comprehension.
I believe that a majority spontaneously rejects monadic style, for good and bad reasons. It used to be a necessity when there were fewer options out there for performant asynchronous programming. The “program is a value” argument is that of a leaky abstraction as soon as purity isn’t enforced (for which, interestingly, caprese/capture-checking and “direct-style” might help).
In all, the monadic style has always been pretty niche, except in the rare occasions there was no compelling alternative. I don’t expect it will see more adoption. What it was promising to deliver on a theoretical-level only (referential transparency) will be accomplished in a more straightforward manner. Runtimes may or may not catch-up with the performance of effect systems, it won’t matter for the vast majority of the programs. And if you are in this niche, then nothing will change for you except for the few compiler guarantees brought by capture-checking.
Interesting take. I’m personally fine with either style, but I can’t go as far as pretending that the monadic one is ergonomic. I don’t think it’s a great way to develop in general, “Monads don’t compose” is a reality, and having “do-it-all/God Monad” is band-aid for hardly managing to shove everything in a “mother-of-all” for-comprehension.
I believe that a majority spontaneously rejects monadic style, for good and bad reasons. It used to be a necessity when there were fewer options out there for performant asynchronous programming. The “program is a value” argument is that of a leaky abstraction as soon as purity isn’t enforced (for which, interestingly, caprese/capture-checking and “direct-style” might help).
In all, the monadic style has always been pretty niche, except in the rare occasions there was no compelling alternative. I don’t expect it will see more adoption. What it was promising to deliver on a theoretical-level only (referential transparency) will be accomplished in a more straightforward manner. Runtimes may or may not catch-up with the performance of effect systems, it won’t matter for the vast majority of the programs. And if you are in this niche, then nothing will change for you except for the few compiler guarantees brought by capture-checking.