The Swift Evolution proposal provides some background. For example: “If the class is planned to have a value-type equivalent in the near future, then keep the NS prefix. Examples: NSAttributedString, NSRegularExpression, NSPredicate.”https://github.com/apple/swift-evolution/blob/master/proposals/0086-drop-foundation-ns.md#proposed-solution …
-
-
-
You‘re amazing - as always. Thanks!
Kraj razgovora
Novi razgovor -
-
-
They made all the common collections (including NSData) into structs. The ones that were forgotten about aren't commonly used enough I guess. And they took the NS off a few other commonly used types. That's about it. No pattern really
-
That seems about right. Would love to do the same for our SDK with structs. Just not public.
Kraj razgovora
Novi razgovor -
-
-
The official stance was that anything that was auto-bridged from ObjC kept NS, and any type that got implemented as a Swift struct dropped it. It was true for a while at least in Swift 3.x days, didn’t check all the cases but I’m guessing the rule continues to applies today?
-
NSFileManager seems mostly automapped but has no prefix.
- Još 2 druga odgovora
Novi razgovor -
-
-
It seems to me as though anything that would/should be a value type in swift had the NS dropped and then anything related to those got dropped for consistency? Admittedly it’s a guess but it’s all I’ve got
-
Like FileManager? :P
- Još 1 odgovor
Novi razgovor -
-
-
I assumed that anything that should be available in Linux, (where there's no Cocoa) would lose the NS.
-
Oh, interesting. But: NSSet
- Još 4 druga odgovora
Novi razgovor -
Čini se da učitavanje traje već neko vrijeme.
Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.