Comment on Roy — small functional language that compiles to JavaScriptparentComments−pufuwozu14yThe example sucks but is very simple.I didn't add monadic sugar just to be part of the "cargo cult". I added it because I'm eventually going to use it to implement an automatic continuation-passing transform. I've done a similar thing before with ClojureScript's macros:http://brianmckenna.org/blog/cps_transform_js−Miky14yMonadic sugar is probably not the way to go for implementing an automatic continuation-passing transform. Why not just do macros?−pufuwozu14yMonads suit the problem nicely and it's been done in quite a few languages already:http://lambda-the-ultimate.org/node/4117http://ocaml.janestreet.com/?q=node/100http://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.−Miky14yI 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.
Comments
The example sucks but is very simple.
I didn't add monadic sugar just to be part of the "cargo cult". I added it because I'm eventually going to use it to implement an automatic continuation-passing transform. I've done a similar thing before with ClojureScript's macros:
http://brianmckenna.org/blog/cps_transform_js
Monadic sugar is probably not the way to go for implementing an automatic continuation-passing transform. Why not just do macros?
Monads suit the problem nicely and it's been done in quite a few languages already:
http://lambda-the-ultimate.org/node/4117
http://ocaml.janestreet.com/?q=node/100
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.
I 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.