De Icaza: Callbacks as our Generations' Go To Statement
[Posted August 16, 2013 by jake]
On his blog, Miguel de Icaza
touts C# (and F#) async as a superior model for doing asynchronous programming to the mechanisms offered by other languages. He notes that using callbacks for asynchronous programming turns programmers into "
glorified accountants" in much the same way goto statements did, as Edsger Dijkstra's famous "Go To Statement Considered Harmful" paper described.
"
And this is precisely where C# async (and F#) come in. Every time you put the word "await" in your program, the compiler interprets this as a point in your program where execution can be suspended while some background operation takes place. The instruction just in front of await becomes the place where execution resumes once the task has completed."
(
Log in to post comments)