4 ms·
Nooooooo... you're right about enums but this codifies the same error I was trying to elucidate with code. Here, let's try this: enum Booze { case Wine
by abalone 9y ago
Nooooooo... you're right about enums but this codifies the same error I was trying to elucidate with code. Here, let's try this:
enum Booze {
case Wine(region: String)
case Beer
case Whiskey
}
let drink = Booze.Wine(region: "Champagne")
Now.. Anyone want to demonstrate how to use enums for the wine region or, say, whiskey subtypes? Should we use classes?