This week, Ole Begemann talks about introducing an operator to aid interpolating optionals. Which is cool, but then he drops this tidbit:
@autoclosureconstruct ensures that the right operand is only evaluated when needed, i.e. when the optional is nil.
I'd never thought of using
@autoclosure to enforce this sort of "short circuit" behavior before. Very clever!
Hit me up on twitter (@jemmons) to continue the conversation.