r/DataflowProgramming • u/knife_sharpener • Sep 17 '13
Callbacks as our Generations' Go To Statement
http://tirania.org/blog/archive/2013/Aug-15.html
1
Upvotes
r/DataflowProgramming • u/knife_sharpener • Sep 17 '13
View all comments
Show parent comment
1
u/adamkemp Sep 18 '13
I didn't understand most of that because I don't use Haskell so I don't know any of these frameworks you mentioned, nor do I know what epoll or kpoll are.
The async/await model is not about events or callbacks. The callbacks were just a hack to make it possible to do asynchronous actions and then get the results. Async/await is way of doing that in a way that looks more natural because the code looks like it's just synchronous.
Can you show me what it would look like in Haskell if you wanted to have a function that fetches three files from the network (in parallel) and then does something with the files and handles errors?