What is the future of Objective-C?

Will Apple continue to support it, or will we wake up one day to find that Swift is the only viable language?


It's a serious question. Careers depend on it. I don't accept the "No comment" approach that Apple usually takes. It's cruel.


I'm willing to put the time into learning Swift if I have to. I'm not going to do it if I don't. I want to know.


Frank

Post not yet marked as solved Up vote post of flarosa Down vote post of flarosa
28k views
  • Work in a big tech company "MAMMA" as is called today, can't tell which one due to and NDA, a LOT of our codebase still Objc and there is no plans to move a single line, so rest assure Objc will be very alive at least in big tech projects, now for startups or some other projects Swift is ramping up quickly, but I worked in another company that had Objc code base and eventually we started moving to Swift, but it was always a combination of both worlds. Objc still as powerful as C/C++ today.

Add a Comment

Replies

I don't recall Apple saying "no comment" on this. What I recall them saying is that Obj-C will be fully supported for the foreseable future.


The clang compiler is up-to-date and modern in its design. There are probably not going to be any significant language enhancements, but that's not news — there has not been much in the way of change since Obj-C version 2, which was, what?, 10 years ago? (Well, aside from the changes made for Swift interoperability.)


Aside from that is the obvious point that the vast majority of macOS and iOS code is written in C or Obj-C, and it's unlikely the existing code will ever be re-written in Swift just for the sake of changing languages.

So, if you're comfortable in Obj-C, then there's no need to switch to Swift unless you want to.

"Careers depend on it." 😁

If you're not willing to continually learn new skills and programming languages, you're not going to have a career.

DIsclaimer: Old enough to have developed software for the PowerPC macs.

  • I have heard this argument before that "anything developed more than 5 years ago is not worthwhile". Well fine, then dump Unix/Darwin in the trash as well. There is a lot of older code out there, and we are not going to dump it and start over. Unmentioned here as well is that objective-C is an intake for C and C++ code to the Apple world, for the simple reason that Objective-C is backwards compatible with C and C++ (via the C interface). C and C++ developers are not going away anytime soon, and (like it or not) some are even going to prefer C++ to swift. Shocking, I know.

Add a Comment

Another thing to consider is that a lot of the learning curve associated with Apple platforms relates to the frameworks, not the language. Sure, there are some subtle differences between languages, but most of the code you write interacts with frameworks, and that knowledge is completely transferrable.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Hello flarosa,

You mentioned career, so you are the one that needs to answer that question. As far as the overall developer community is concerned, Objective-C is dead and buried. There are still plenty of people using Objective-C, or course, but they are programming, not blogging, and they generally aren't looking for work. If you are looking for work, or ever plan to in the future, then Swift is the only game in town. Objective-C isn't going to get you past the initial automated and/or HR screens.

Obj-C will be supported for a long time.


They can't remove it, because removing it would be stupid.


- Swift is still a beta language.

- Most code out there is written in many versions of c, mostly objectiveC

- if they stop supporting ObjC they'll lose all their apps in the app store, not to mention most of the internal apple code is written in ObjC.


Apple did say they will support it, and have no plans of removing it. Good to learn all the languages naturally, but be aware swift is still a giant mess.

>> Swift is still a beta language

>> swift is still a giant mess


Please don't say things like this. They're misleading at best. If you have complaints about Swift, state them where they might be useful, over on forums.swift.com.


>> if they stop supporting ObjC they'll lose all their apps in the app store


Please don't say things like this. If the Obj-C language were abolished today, all of the apps in the app store would still run, because macOS would still contain the Obj-C runtime (and it will continue to contain it indefinitely, because Swift needs it too).

Wrote apps in Swift that are more than 200 000 lines of code.


And gone through Swift 1, 2, 3 4 in the meantime with no major problems (of course, need to change some code, mostly when going from Swift 2 to 3).


Now, Swift is pretty stable, even though some advanced features are still evolving or even added.


So, it is certainly not as stable as Fortran 77 or Cobol, but by I can say it is in no way a beta nor a mess.

Swift is still a giant mess? Lol...

Ah, Fortran 77 with punch cards, my first language in 1969. Sticking with objective-c for now. I love it.

same for me, in 1967 in 6.47

'68

The developers who blog often are all in on Swift and every time its popularity gains there are articles published about it. Though it appears that according to TIOBE ObjC came back and is ranked at 10 while Swift is ranked at 11 http: //www.tiobe.com/tiobe-index/ and all I heard was crickets. Not sure how accurate that index is.


ObjC developers could be the silent majority but my guess is that they split the community roughly in half. For my own apps I don't think I'd ever choose Swift over ObjC. That's just my opinion though.

This was last posted to 2 years ago, and would be interested in peoples opinion on the matter now.

I've had a few internal birdies tell me that Objective-C will be put out to pasture in the near future once all frameworks are ported over, and from what I'm hearing that is/or has nearly been completed. Possible mention at WWDC 2022, with 3 years to finally pull the plug.

The issue is Apple having to support 2 development languages and along with that all those people involved in keeping both system alive. You will find that new frameworks will be only supported in Swift so eventually everyone will have to be using Swift.

For those supporting older apps and code bases, it'll be like the move to 64bit iOS apps and the removal of 32bit apps from the store. If you still need to support internal 32bit then an older Mac with older OS and Xcode would be needed.

The removal of Objective-C seems to be tied in with the move to Apple Silicon. I could be wrong on that point, but then again, makes sense.
  • It might happen, but definitely not for your reasons because they still have to support C++ and C as this are the low level languages. And i can't see any reason why they would remove it from XCode. It's a failure Microsoft regrets to bet everything on C# and now they come back to C++ with WinRT.

    You might not be informed enough to understand that the Darwin core and even the new TextKit2 (published just in 2021) is written in this languages. You can't replace an architecture without removing but you don't need to replace a language with the same binary object model. Also the business logic behind the Catalina 32-bit end was just to get the bad marketing out of the Arm switch. Everyone blames Catalina now for breaking incompatibility. A smart move from Apple.

    Swift is only the user interface language. But yeah, Objective-C is also only a user interface language.

    The main reason to still use Objective-C is the for free integration with a C++ business layer.

Add a Comment

I've had a few internal birdies tell me that Objective-C will be put out to pasture in the near future once all frameworks are ported over, and from what I'm hearing that is/or has nearly been completed. Possible mention at WWDC 2022, with 3 years to finally pull the plug.

What are you feeding those birds? Fermented berries? Apple never even managed to port its frameworks to Objective-C 2.0, let alone having ported them all to Swift. This is a company that still uses "goto" on a regular basis.
  • GOTOs are not bad, when they are used properly in the very few cases they make absolutely sense. For "very near to the machine" system programming. We are in 2023, and what Djikstra was compelling about gotos is decades ago.

Add a Comment

Just one comment. Remember that Apple DID indeed, dump a language before. The old MAC software was written in Pascal ;-).

  • They didn't drop a language. They moved from procedural to OO design. And Pacal did not (easily) support it.

Add a Comment