Re: [swift-users] Store objects of generic types in a data structure

2017-04-08 Thread Brent Royal-Gordon via swift-users
> On Apr 8, 2017, at 5:22 AM, Hugo Lundin via swift-users > wrote: > > How would I be able to achieve this in Swift? My current idea of this > approach does not seem to work, but also the idea to create specific > subclasses for every type (and then type cast the

[swift-users] Store objects of generic types in a data structure

2017-04-08 Thread Hugo Lundin via swift-users
Dear all, I am currently playing with a concept in Swift to store statistics in apps using generic types. One of the key parts are the ability to register properties (for example booleans, strings and integers - but also more complex data types such as dates): stats.add(description: "iOS