Andreas Rossberg (2015-07-14T07:20:18.000Z)
d at domenic.me (2015-07-25T02:53:07.550Z)
All you are proposing is to allow the braces to be dropped from a do-expression, right? That's an obvious tweak, although I'm not sure if it really improves readability. (Other than that, do-expressions are already intended to work as you describe, using the completion value of the statement list. That's their whole point, after all.) I had something else in mind. Once we have do expressions, we can introduce syntactic sugar that effectively makes any statement syntax into legal expressions. E.g.: ``` throw expr ~> do { throw expr; } try expr catch (pat) expr ~> do { try { expr; } catch (pat) { expr; } } if (expr) expr else expr ~> do { if (expr) expr; else expr; } etc ``` At least for those statements for which it makes sense. To avoid ambiguity, all you need to do is extend the existing restriction that none of the initial keywords may start an expression statement. But I intend to propose that separately from (or as an optional part of) the do-expressions proposal, since it might be more controversial.