Backporting let+ syntax to BuckleScript using Dune's ocaml-syntax-shims?



OCaml 4.08 is adding a new let+ syntax which is really useful when writing monadic-style code (PR). The Dune authors wrote a syntax shim to add support for the syntax for OCaml >= 4.02 (announcement, code). Is there any plan or interest in adding this to BuckleScript before BuckleScript is upgraded to OCaml 4.08 (which is probably going to happen several months after 4.08 final is out)?


I proposed this here:

This would be really good to have imho :slight_smile:


Awesome! I just added the 7th :+1: on the comment. I hope Bob considers this. I’d love to use it with a Promise wrapper.


That’d be awesome, current use of promises is a bit clumsy, this let+ syntax is very clear and would definitely solve the promise issue (plus tons of other use cases for monads)