3 ms·
My suggestion is to use async in F# code by default. Use task for certain heavy server code on .NET and promise for JS interaction, where required. Async mostly
by pharmakom 5y ago
My suggestion is to use async in F# code by default. Use task for certain heavy server code on .NET and promise for JS interaction, where required. Async mostly works everywhere.
- kevinmgranger 5y agoIs there some sort of (for lack of a better term) Monad Transformer that lets you mix `async` and `promise` in the same computation expression?
- pharmakom 5y agoComputation Expressions are implemented using a class under the hood so you could probably build one with appropriate overloads. There’s a function that Fable provides to turn a promise into an async, so mix and match isn’t a huge challenge anyway.
- kevinmgranger 5y agoYeah, I'm just trying to avoid having to throw the adapters on each line. Just like fable supports any thenable, it'd be cool if async/task could be treated as a thenable.