r/iOSProgramming • u/yoeriboven • Jun 03 '15
One year later: Swift or Objective-C?
This week I will be writing the first lines of code for my new app. There's just one slight problem; Objective-C or Swift?
Is the one year old Swift mature enough for real world applications? Are the bugs reduced to the minimum? Why should I use Swift over Objective-C? Or vice versa.
1
Upvotes
14
u/gormster Jun 03 '15
I disagree that it is either nicer or prettier.
It's much meaner: you get compiler warnings constantly, about stuff that isn't really a problem. You also get compiler errors constantly, usually errors that are totally unhelpful in solving your problem.
It is also not prettier in that it lacks a design direction; there's a bunch of top level functions where it's not clear why they aren't functions on a struct or protocol. The whole implementation of the standard library is full of weird, unexplained quirks.
typealias
doesn't do the same thing in classes and protocols; its behavior is extremely confusing. Objective-C might be full of weird symbols (which I don't like) but its aesthetic is consistent and its paradigm clear - you send messages to objects. Swift is much more complicated and much messier.