Why is Bool implemented as a struct instead of as an enum?

Can confirm. These days the compiler is good enough that we probably could use an enum, but back in the pre-Swift-1 days it really did lead to worse code. It does still bug me that something that's so obviously enum-like isn't actually implemented as an enum, but I don't think there are any practical issues with it being a struct.

13 Likes