Shorthand for guard else empty return statement

I would suggest reading existing discussions on this topic:

  1. An implicit return for guard
  2. Inferred return for guard statement
  3. Proposal: Add implicit/default else-behaviour for the guard statement
  4. Guard Implicit Fallback
  5. guard let x = x

Here's what Chris had to say about this:

Personally, I don't see the benefit of dropping curly braces, else or return (or a combination of them) - while you get rid of a few keystrokes, you lose a bit of clarity which isn't very nice.

1 Like