nil
を渡さなければ T
でも動くextension String.StringInterpolation { mutating func appendInterpolation<T>(_ val: T?, default defaultValue: String) { if let val = val { appendInterpolation(val) } else { defaultValue.write(to: &self) } } } let value: Int? = 99 print("The value is: \(value, default: "<nil>")")