9 ms·
Monadic sugar is probably not the way to go for implementing an automatic continuation-passing transform. Why not just do macros?
by Miky 15y ago
Monadic sugar is probably not the way to go for implementing an automatic continuation-passing transform. Why not just do macros?
- pufuwozu 15y agoMonads suit the problem nicely and it's been done in quite a few languages already: http://lambda-the-ultimate.org/node/4117 http://lambda-the-ultimate.org/node/4117 http://ocaml.janestreet.com/?q=node/100 http://ocaml.janestreet.com/?q=node/100 http://en.wikibooks.org/wiki/F_Sharp_Programming/Async_Workflows http://en.wikibooks.org/wiki/F_Sharp_Programming/Async_Workf... This is something that JavaScript desperately needs. Macros aren't so nice for this stuff in non-homoiconic languages.
- Miky 15y agoI previously had a someone antagonistic comment, but I decided to remove it. I think that finding ways to notate asynchronous code cleanly is a pretty awesome goal, and I hope you find success in your project.