|
|
|
|
|
by _qulr
2095 days ago
|
|
> Optionals doesn't exist because of ObjC compatibility. The problem is that every Objective-C type is essentially an optional, so any Swift code using Cocoa frameworks, based on Objective-C, is a deluge of optionals. Your entire code base is constantly dealing with them. It's a mess. > I didn't understand the part about the initializer pattern... are you talking about constructor overloading? I'm talking about this:
https://docs.swift.org/swift-book/LanguageGuide/Initializati... |
|
Like I said, Optionals are an extremely popular feature in most modern languages, and Swift would be very criticized if it had not included it.
> I'm talking about this: https://docs.swift.org/swift-book/LanguageGuide/Initializati...
Ok, you are talking about constructor overloading, which is a pretty common and uncontroversial feature present in pretty much every OOP language made in the last 30-40 years.