scholarship.claremont.edu
The Future of iOS Development: Evaluating the Swift Programming Language
Excerpt
many advantages over Objective-C, and is easy for developers to learn and use. However there are some weak areas of Swift involving interactions with Objective-C and the strictness of the compiler that can make the language difficult to work with. Despite these difficulties Swift is overall a successful project for Apple and should attract new developers to their platform. i … to constantly unwrap everything. Additionally some of the Cocoa Touch methods require Objective-C objects such as NSObject or AnyObject which makes them harder to use. It can be difficult to work within the rules of typecasting in Swift when you need to turn a String into an AnyObject type. Strings are not objects in Swift, and therefore must be cast to NSStings … makes it difficult to use code completion in Xcode because you need to know exactly what the method name is before you call it. The second difficulty was that in order to find an element in an array that element must extend the Equatable protocol. This requires that the == method be overloaded at global scope, rather than being contained in the class. However Swift does not allow the == method to accept a protocol as a parameter, which means the Shape protocol cannot extend Equatable and therefore it is impossible to have an array of protocols in Swift. There are also a few things that should work in Swift that seem to be broken. Several methods on Strings, such as containsString or length, are
Related Pain Points
Lack of abstract classes complicates inheritance patterns
5Swift lacks abstract classes, requiring developers to decompose into concrete base classes and protocols. This leads to complicated generic signatures, requires significant experimentation, and can cause compiler crashes.
Swift Interoperability with Objective-C and Type System Strictness
5Swift's interactions with Objective-C and strict compiler rules make it difficult to work with legacy code. Type casting issues, particularly converting between String and NSString/AnyObject types, and constant unwrapping requirements complicate development.