Open samuelgoto opened 6 years ago
Crucial to this suggestion is that it would apply to do
expressions as well. Anywhere we might be tempted to use completion value, we should use this instead.
The absent semicolon above would be syntax, not a missing semicolon to be repaired by ASI. Since we're only talking about new syntactic forms, we have that option.
Credit where due: Inspired by Rust's syntax.
From @erights:
One of the alternatives worth exploring here is to "the last expression without a semicolon" to take as the return value. For example: