Standard patterns in Swift