Re: [swift-users] The value of enums

2016-11-07 Thread Tino Heth via swift-users
> …oh, I just realized we’re on -users not -evolution here. :-) Core found an effective way to limit the distractions from evolution: Over there, this would have been a proposal to remove enums [with associated objects] in favor of union types ;-) Tino Joking aside, imho it's a pity that all th

Re: [swift-users] The value of enums

2016-11-06 Thread Dave Abrahams via swift-users
on Sun Nov 06 2016, Nevin Brackett-Rozinsky wrote: > …oh, I just realized we’re on -users not -evolution here. Perhaps I’ll > bring this up next time switch expressions are proposed. Thanks ;-) -- -Dave ___ swift-users mailing list swift-users@swif

Re: [swift-users] The value of enums

2016-11-06 Thread Nevin Brackett-Rozinsky via swift-users
To the topic at hand, the project I’m currently working on has 2 enums, both with String raw values. For comparison, it has 3 classes (a Formatter subclass, the app delegate, and one more), 4 protocols, and 47 structs. One of the enums exists to select among the handful of struct types which confo

Re: [swift-users] The value of enums

2016-11-06 Thread Dave Abrahams via swift-users
on Sun Nov 06 2016, Tino Heth wrote: > Enums are a fundamental part of Swift, so I guess they won't change > much — but I wonder if anyone shares my observations in real-life use… > > Afair, there are three different types of enums: > - Enums with raw values > - enums with associated objects > -

Re: [swift-users] The value of enums

2016-11-06 Thread Erica Sadun via swift-users
> On Nov 6, 2016, at 4:07 AM, Tino Heth via swift-users > wrote: > > Enums are a fundamental part of Swift, so I guess they won't change much — > but I wonder if anyone shares my observations in real-life use… > > Afair, there are three different types of enums: > - Enums with raw values > -

Re: [swift-users] The value of enums

2016-11-06 Thread Rien via swift-users
As usual: it depends. I use enums with associated values quite a lot. In my experience there is quite a thin line between very convenient and too much. I have several cases where I started off with enums with associated values, only to later convert them to classes. As long as the enums only hav

[swift-users] The value of enums

2016-11-06 Thread Tino Heth via swift-users
Enums are a fundamental part of Swift, so I guess they won't change much — but I wonder if anyone shares my observations in real-life use… Afair, there are three different types of enums: - Enums with raw values - enums with associated objects - Plain enums (no underlying value) I use the first