[swift-evolution] Anonymous Enums

Brent Royal-Gordon brent at architechies.com
Sat Feb 20 01:17:26 CST 2016

> func adjustTemperature(temp:[low|normal|high]) {
>   // ...
> }
> adjustTemperature(.high)

This is clever, and I certainly understand the appeal, but sooner or later someone is going to want to store a value that's intended to go into this parameter in a variable, and then what do they do?

Brent Royal-Gordon

More information about the swift-evolution mailing list