3 ms·
Does it mean Objective C is going to be second-class language? It would be a pity, I prefer Objective C to Swift.
by vbezhenar 4y ago
Does it mean Objective C is going to be second-class language? It would be a pity, I prefer Objective C to Swift.
- miffy900 4y agoSeems so. I often wonder what things would be like if Apple had improved upon Objective-C by fixing up the underyling C language. Yeah it'd no longer be a superset of C, but so what? Neither is Swift. Swift is great but I wish it was closer to Objective-C in spirit by deliberately being a more lightweight language. It's language spec is gargantuan - they've pretty much succeeded in making it a language as complex as C++. Merely adding generics and better typing akin to TypeScript's, to Objective-C would've worked wonders and made the transition less abrupt.
- pjmlp 4y agoNot up to date? They already made most of what was possible without breaking compatibility. https://medium.com/ios-os-x-development/generics-in-objective-c-8f54c9cfbce7 https://medium.com/ios-os-x-development/generics-in-objectiv...
- secretsatan 4y agoI used to too, it took me a while to switch, but now I see the benefits. Obj-c does give a lot more freedom, and sometimes you still need it, but what initially felt restrictive does actually lead to less buggy and predictable code, and some protocols like codable cut out massive amounts of code. I still rely on some stuff like GCD that isn't very swift like, there still isn't anything as fine grained in Swift, but I'm liking combine in some cases.
- vbezhenar 4y agoMy issue with Swift is that it changes faster than I can learn it. I'm not Apple developer, I just write some code for macOS or iOS sometimes, like one time a year. I learned Objective C few years ago and this knowledge is with me. learned Swift 1 but now it's different and it seems that I have to learn it again almost from the scratch. For professional *OS development Swift probably makes sense. But if I occasionally need to write some code, Objective C for me is preferred. May be Swift is stabilized enough already...
- j-f1 4y agoThere were a lot of changes made in the Swift 1–3 time frame as the team learned what it was like to write Swift at scale and developed a unique language style. That’s all done now, and Swift 5 code (released 2019) should continue to be compilable with few exceptions long into the future. It’s different enough from Swift 1 that it’s basically a different language though. The biggest source-breaking change on the near-term horizon (which is still in progress) is compile-time enforcement of concurrency safety.