Exactly. It's a (at this point, unofficial) Swift feature called "function builders." The types end up being the same, because the conditionals are represented as wrapper types.
So
if count == 0 { EmptyView() } else { Text("\(count)") }
https://github.com/apple/swift-evolution/blob/9992cf3c11c2d5...
Exactly. It's a (at this point, unofficial) Swift feature called "function builders." The types end up being the same, because the conditionals are represented as wrapper types.
So
would result in a type something like `Conditional<EmptyView, Text>`.https://github.com/apple/swift-evolution/blob/9992cf3c11c2d5...