6 ms·
They did a great job of almost plastering over all the typical Objective-C and Cocoa things in Swift but you can't escape some of these weird underlying mechani
by dep_b 10y ago
They did a great job of almost plastering over all the typical Objective-C and Cocoa things in Swift but you can't escape some of these weird underlying mechanisms of Objective-C creeping in without sacrificing compatibility.
Great read, good to know this stuff. I encountered a few of these examples while poking around with more complex features in the language.
- melling 10y agoMakes you wonder how long before Apple stops making the compromises in compatibility. In the near term, sure, but 3-5 years down the road, they may favor Swift.
- deleted 10y ago[deleted]
- johncolanduoni 10y agoIt would definitely be a good place to reuse their Cocoa/Carbon strategy.
- pjmlp 10y agoThey already do. All the recent Objective-C features were added to improve the compatibility between both languages, reducing Objective-Cisms in Swift.
- dep_b 10y agoI noticed that nullable nonnull did almost nothing for my Objective-C code. A real bummer, I would love to have a good analyzer warning for that.
- KingOfBrian 10y agoI'm not sure what they're sacrificing in terms of compatibility. Do you have any examples? There is a degree of complexity, but providing interoperability with most languages more complex than C will introduce complexity.