top | item 43547973

(no title)

malakai521 | 11 months ago

The syntax is exactly the same. You have `var x = await` in C# and `let! x =` in F#

The controller handler is also the same. It will be marked with `async` keyword in C# and `task` CE in F#

discuss

order

shortrounddev2|11 months ago

It's absolutely not exactly the same; let! is only available within a computation block. If you want to return some value from the computation block and return to Functional land without having to pause the thread you need to use a continuation, which C# has built in syntactic sugar for in async/await and F# does not.

sparkie|11 months ago

`await` can only be used in an `async` function. How is that so different from `let!` only being available in a computation expression?

xigoi|11 months ago

A computation block is the equivatent of an async function;