Re: [swift-users] Swift alternative for heterogeneous collection of objects with "generic" contents.

2017-06-30 Thread Joe Groff via swift-users
> On Jun 29, 2017, at 10:59 PM, Mikhail Seriukov via swift-users > wrote: > > Hello everyone, > In objc there is quite common pattern when we use a base class with a type > property and concrete subclasses where type is uniquely identifying the > subclass. > We can then safely put subclasses

[swift-users] Swift alternative for heterogeneous collection of objects with "generic" contents.

2017-06-29 Thread Mikhail Seriukov via swift-users
Hello everyone, In objc there is quite common pattern when we use a base class with a type property and concrete subclasses where type is uniquely identifying the subclass. We can then safely put subclasses objects into an array and then safely downcast them when needed. This kind of behaviour is c