[swift-evolution] [Idea] Repurpose Void

Brent Royal-Gordon brent at architechies.com
Mon Apr 25 16:37:31 CDT 2016


> Just wanted to quickly throw out that Kotlin's Unit class, their "equivalent" of void, semantically follows the definition of "type with only one value" laid out in the enum Void example above. 

`enum Void {}` is not a type with only one value; it's a type with no values.

-- 
Brent Royal-Gordon
Architechies



More information about the swift-evolution mailing list