Pitch: Multi-statement if/switch/do expressions

The "confusing part" in this case isn't that people won't know how return works in that context, it's that readers will have to take in a lot more context for every return they see when reading a function and reasoning about it. That cognitive overhead can't be fixed with documentation.

32 Likes