I got an interesting question during my daily coding. When I define a NSString property in Objective-C and then use it in Swift. It automatically cast it to String!, which is non-nullable.
From my perspective, by default NSString property could be nil in Objective-C, but sometimes we could also declare it as nonnull. Since Swift compiler does not know whether a particular NSSring * is optional or not, the type is brought into Swift as an implicitly unwrapped optional, String!.
The question is what’s the benefits in making so? I encounter the case in our codebase when it crashes my app due to the force unwrap issue. However, it does not give me any warnings or errors in compile time, which means it does not take the advantage of type safety; hence why Swift makes such bridge mechanism like this?