4 ms·
Async/await started with F# and was added to C# later.
by yareally 10y ago
Async/await started with F# and was added to C# later.
- soulbadguy 10y agoWhile booth F# and C# have the same aim, they have totaly unrelated implementation and are quite different beats. IMO the C# design wasnt derived from F#.
- edgyswingset 10y agoThey are similar in that F# was the first .NET language to say, "what could language constructs for asynchrony look like?" and implement it. They are fundamentally different models, though. F# uses a "cold task" model where invoking an async function returns a specification of work, which you must then start. You can start this work in different ways so that you have control over the semantics of how it executes. C# uses a "hot task" models, where invoking the async method returns a handle to background work that has already been "kicked off". This is actually an oversimplification, because the semantics of what is actually the asynchronous thing you're awaiting can differ. But the overall concept follows this pattern.