Re: [swift-users] Reflection in Swift 3?

2016-11-15 Thread Rick Mann via swift-users
> On Nov 15, 2016, at 05:24 , Jeremy Pereira > wrote: > > >> On 15 Nov 2016, at 10:33, Rick Mann wrote: >> >> Well, that's not really any different than a switch statement, in that it >> has to be maintained. > > Yes, but I would

Re: [swift-users] Reflection in Swift 3?

2016-11-15 Thread Jeremy Pereira via swift-users
> On 15 Nov 2016, at 10:33, Rick Mann wrote: > > Well, that's not really any different than a switch statement, in that it has > to be maintained. Yes, but I would argue that it is a good thing because you need to do some validation before you instantiate the class

Re: [swift-users] Reflection in Swift 3?

2016-11-14 Thread Rick Mann via swift-users
Thanks, David. That's interesting as a thought exercise, but doesn't really get me away from having switch statements. I'll probably end up just "slightly polluting" my classes by adding extension methods to create the appropriate auxiliary classes. Sure wish Swift supported optional methods

Re: [swift-users] Reflection in Swift 3?

2016-11-13 Thread David Sweeris via swift-users
> On Nov 13, 2016, at 1:55 AM, Rick Mann wrote: > > >> On Nov 12, 2016, at 22:47 , David Sweeris wrote: >> >> >>> On Nov 13, 2016, at 00:38, Rick Mann via swift-users >>> wrote: >>> >>> So, it seems there's still no way

Re: [swift-users] Reflection in Swift 3?

2016-11-12 Thread Rick Mann via swift-users
> On Nov 12, 2016, at 22:47 , David Sweeris wrote: > > >> On Nov 13, 2016, at 00:38, Rick Mann via swift-users >> wrote: >> >> So, it seems there's still no way to do something like instantiate a class >> given only its name (as a String)? >> >>

Re: [swift-users] Reflection in Swift 3?

2016-11-12 Thread David Sweeris via swift-users
> On Nov 13, 2016, at 00:38, Rick Mann via swift-users > wrote: > > So, it seems there's still no way to do something like instantiate a class > given only its name (as a String)? > > In my situation, I have a number of subclasses (or protocol implementations), >