> …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
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
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
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
> -
> 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
> -
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
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