Hacker News new | past | comments | ask | show | jobs | submit login

To my knowledge, Reason is just an alternate syntax over OCaml and the two can be converted to each other. Thus, Reason should have the same semantics as OCaml. As OCaml isn’t just targeted at JavaScript, IMO adding async/await sugar for Reason wouldn’t make sense. (I assume that you mean syntax that desugars to JS promises. Correct me if I misunderstood.)

Although, it would be pretty cool if OCaml got some kind of do-notation (like Haskell), a generalization of async/await sugar for any monad structure...




I think you're looking for let syntax (https://github.com/janestreet/ppx_let). It is syntactic sugar for monads and applicatives.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: