I'd add typed enums to the list of notable bug-avoiding improvements in Swift. I sometimes describe Objective-C as "all of the memory safety of C with the type safety of SmallTalk".
Re:Swift Programming Language Evolution
by thevibesman on Monday May 09, 2016 @02:37PM
(#11662045)
I may steal that quote; I think I like it better than calling Objective-C the "wild west of OOP".
It has very poor support for custom value types. Objective-C structs basically can't contain object pointers, so they're limited to simple things like CGRect. They also can't contain methods, so you end up writing associated code in global functions.
Protocols are extremely limited. They're basically just collections of method declarations. There's no way to add functionality to every class which conforms to a protocol.
Objective-C is often verbose to the point of painful redundancy. Consider:
Versus: Other examples include having to write the signature of every public method twice (once in the header and once in the implementation) and the need to do an annoying `self = [super init]` dance in every initializer.There's almost no functional programming stuff available, like map and reduce. This is not strictly a language complaint, but since the standard libraries are pretty tightly woven in, I think it still counts.
Generics support is really limited. What's there was only added to interoperate better with Swift, anyway!
That's a quick overview of some of the ways Swift improves on ObjC. I'm sure there's more.