Hacker News new | ask | show | jobs
by chmaynard 1846 days ago
This probably means that a significant number of important apps are still coded in Objective-C, which would not be a big surprise. Is the momentum of Swift language adoption slowing down? If so, perhaps Apple is also hedging their bets.
4 comments

It’s not so much the apps as the system frameworks they’re built upon, which are still almost universally Obj-C (or some other C-family language). Even if every third-party or user-facing first-party app was 100% Swift, there’d still be massive wins from speeding up objc_msgSend.

(Not to mention that even pure-Swift apps use a lot of Obj-C-isms when touching said system frameworks, like the target/selector setup for most UI controls).

Most new Apple project are still started with ObjC, you can tell from those hiring. I mean a little less than two years ago Apple Pay team were "suggesting" doing something new written in ObjC.

My guess is that Apple dont mandate Swift no new project. And the team gets to decide. It will probably be another few years when Swift 6.0 is out before a gradual transition of news apps to Swift by default.

And I am still skeptical of Swift being a system programming language. Sometimes I wonder why Apple dont make some more minor changes and improvement to ObjC.

I wouldn't be surprised if Swift also calls objc_msgSend for accessing macOS APIs, or at least a practically identical function.

The Objective-C runtime library (which objc_msgSend is a part of) allows to access the "Objective-C object model" from other languages than Objective-C via a C-API.

Metal is a mix of Objective-C and C++14 subset as shading language.

Same applies to many system Frameworks written before Swift happened.

I bet they aren't running X rewritten in Swift blog posts inside Apple.