[swift-evolution] [Proposal] Enums with static stored properties for each case

Jānis Kiršteins janis.kirsteins at gmail.com
Wed Jun 1 02:01:27 CDT 2016


UIBezierPath is shared for all instances of the enum case. So stored
properties are stored per case, not per instance (you have associated
values for per instance values).

> that isn't really what this syntax suggests is happening

Please explain what makes you think that way.


On Tue, May 31, 2016 at 11:52 PM, Brent Royal-Gordon
<brent at architechies.com> wrote:
>>    case spades {
> <snip>
>>        let bezierPath = UIBezierPath()
>
> Does each instance of `.spades` have a *separate* UIBezierPath, or do all instances of `.spades` share one? If it's the former, I have strong doubts you'll actually get this through. If it's the latter, that isn't really what this syntax suggests is happening.
>
> --
> Brent Royal-Gordon
> Architechies
>


More information about the swift-evolution mailing list