The proposal is to make do EXPR done a first-class syntactic element which desugars to EXPR : unit. do EXPR done already exists in OCaml as the body of for and while loops which must always have type unit, so factoring it out into first-class syntax makes a lot of sense. The PR has a couple of nice use cases.
Unfortunately the PR was recently closed due to lack of interest so I want to encourage folks to take a look and see if you like it (or not).
I’m not sure if adding additional construct for expressions is worthwhile.
We already have parenthesis and begin-end, and many OCaml programmers prefer to avoid begin-end.
Note also that having for or while loop without do-done part is meaningless.
I don’t think we lose anything by adding this construct, and it might make some code easier to read, so I’m for adding this.
On a related note, I’m curisous as to how much code would actually benefit from this. Personally, I write very little code consisting of large blocks of unit-returning statements, unless I’m using something like Buffer to construct a large text block.
I have no opinion about the proposal, but I have written a bit of code using Owl’s plplot interface, sometimes in a loop. This design of plplot and Owl’s (easier) interface to it requires involves sequences of imperative calls to configure the graphics setup for a plot. My guess is that graphics often involves many imperative calls.