[swift-evolution] List of all Enum values (for simple enums)

Joe Groff jgroff at apple.com
Wed Dec 9 13:06:11 CST 2015


> On Dec 9, 2015, at 4:37 AM, Kevin Wooten via swift-evolution <swift-evolution at swift.org> wrote:
> 
> I don’t think this is overcomplicating things at all.  I see many useful cases for this.
> 
> I would suggest a simple change to Enumerable…
> 
> protocol Enumerable : CustomStringConvertible, CustomDebugStringConvertible {
>> }
> 
> The number of times the enumeration value name is needed at runtime is just too great.

Everything is string-convertible; no need to force Enumerable implementations to provide custom printing implementations.

-Joe


More information about the swift-evolution mailing list