r/iOSProgramming • • Feb 19 '16

Discussion Swift vs Objective-C

[deleted] — view deleted post

5 Upvotes

146 comments sorted by

View all comments

Show parent comment

1

u/[deleted] Feb 20 '16

That's really nifty. And the entire reason that works is Objective C's runtime. Without it - in pure Swift - none of that works because the Swift runtime isn't really documented and isn't exposed in the same way that Objective C's is.

So I'd say that's really the worst case. If I use Objective C I don't have to write any of that cruft at all.

It would be more or less trivial to write an NSCoder that did this. It would be a lot cleaner too.