DEV Community

Discussion on: How C# asynchronous programming is different than what you think

Collapse
 
louy2 profile image
Yufan Lou • Edited

For imperative style async is probably the best. There is no practical way or need to abstract to higher-kind, so it is necessary and sufficient to have keywords for a few managed effect and make special case type checks for them.

For purely functional style asynchronicity is just another monad in the effect stack. More specifically, the standard Concurrently is not even a monad, but a monoid, so you can only express parallel composition, and any dependency (blocking) has to be lifted and chained to the inner IO. The next step in this is streaming libraries and the functional reactive style.

Another famous async model is Erlang's actor model.