One Swift cricitism has been the lack of a macro system that would allow users to freely extend the language like Lisp (and other homoiconic) languages do. While this is indeed not possible, there is a hidden gem in the Swift language that gives us some flexibility in this domain. If you look at the Swift documentation for the various operators, you'll find this line:

func &&(lhs: LogicValue, rhs: @auto_closure () -> LogicValue) -> Bool

The && operator has two arguments: The left hand side and the right hand side. Swift first checks the left hand side. If this evaluates to true, only then will it evaluate the right hand side. This means that the right hand side expression will defer evaluation until the left hand side was evaluated.

How does Swift do this? Through the magic @auto_closure syntax. This tells Swift to wrap the expression into a closure and only evaluate it if explicitly told to do so. The full function might look something like this

func &&(lhs: LogicValue, rhs: @auto_closure () -> LogicValue) -> Bool { // Proof for left hand side if lhs { // Only then execute and thus proof right hand side if rhs() == true { return true } } return false }