3 ms·
I wonder if Cocoa is that language specific or if it’s become legacy tech. When Swift was announced and when I explored it for personal projects, I was very muc
by eyelidlessness 4y ago
I wonder if Cocoa is that language specific or if it’s become legacy tech. When Swift was announced and when I explored it for personal projects, I was very much calling Cocoa APIs. They definitely catered to ObjC-isms, but my impression was that all of the underlying UI frameworks were being preserved even if they might gain additive APIs to be used less awkwardly in Swift.
- pjmlp 4y agoThis year Apple made the point Objective-C is done, time to move on, for those that were still wondering. Around minute 4, or go through the transcript. https://developer.apple.com/videos/play/wwdc2022/102/ https://developer.apple.com/videos/play/wwdc2022/102/
- LeoNatan25 4y ago“Objective-C is done, time to move on” … except for Apple themselves, where we still see a steep rise in ObjC year over year with no visible sign of slowing that incline. Likewise for AppKit. Apple, the “do as we say, not as we do” company.
- andai 4y agoInteresting, I wonder if that is for technical reasons (low level stuff; performance?) or just inertia?
- pjmlp 4y agoMostly inertia, the only new subsystem where Objective-C plays a major role is Metal, and even there most examples make use of the Swift bindings.
- pjmlp 4y agoExcept several systems have been rewritten in Swift for Ventura, also mentioned in other talks. Besides this is nothing new in the industry, some Android business units and Windows ones, are quite adverse to touch anything besides C++, regardless of the guidelines to the rest of us.
- salmo 4y agoIt’s also funny to think of companies like Apple, MS, etc. as having 1 opinion or even tactic. I know they say it. But they’re made up of 100s-1000s of groups. And at Apple especially, many of these groups are not allowed to talk to each other. From the outside it’s easy to see companies that way. But if you’ve ever been inside a large company, you know what I’m talking about. That’s not unique to tech, either. And rewriting software in a new language is always going to get back burnered by delivering new features. Until there’s a fundamental change they want that justifies a rewrite, a codebase is staying in its current language due to inertia. Heck, companies will lie to themselves about these things. My favorite is this pattern Execs: We’re all going to X! Crowd: Yaaay. [Some project leads look at each other with a mix of sarcasm and fear.] Initiative kicks off. Swag is distributed. Projects are identified. Exec: [Looks at $] Well, except this one. And that one… Ok, we’ll replace all of these [waves arms] in 3-5 years. Narrator: 3-5 years continues to be relative to the current date.
- bigbizisverywyz 4y ago.net being a good example of this I'm sure I still have CD case with 'Windows .net' printed on it which contains Windows 2000 and SQL Server... .net? The marketers really went to town on that one, would have loved to be in the creative pitch meetings for that swag. '.net, what is it??' 'Who knows??! But if we print .net in multicolour on enough stuff, somebody might figure it out!'
- thinkling 4y ago> The marketers really went to town on that one, To be fair, the developers at Microsoft went to town on it as well, adopting C# for parts of Windows Blackcomb, including the File Manager, the Desktop Manager, and (some of) WinFS. It turned into a fiasco and the .NET adoption was mostly dropped, as far as I remember, when they did the "reset" and pivoted to Vista.
- pjmlp 4y agoBecause the WinDev team sabotaged, the effort, instead of doing an Android or ChromeOS with everyone roaming into the same managed direction, they made sure they pretty Windows APIs would win.. So since Vista all new APIs follow Longhorn ideas, while using COM, followed by Windows Runtime, with the caveat that tooling is just as bad as before .NET was invented, but hey they are happy fellows on their little turf.
- JKCalhoun 4y agoAll new projects I was involved in over the past three years or more were in Swift. I would say it is considered in bad form to start a new project in anything other than Swift. Further, I saw many legacy projects move from Objective-C to Swift (Podcasts comes to mind). (Some legacy Objective-C apps like iTunesU, sadly, were "sunsetted".) Until recently, I believe there were issues with frameworks written natively in Swift so I saw a few smaller frameworks thrown together in Objective-C. I believe that, whatever the issues were, are no longer pertinent. I can say too that there are many engineers that don't even know how to code in Objective-C. The younger engineers learned on Swift and are even hostile to writing in Objective-C (ha ha). Of course Apple is a big company and I can't speak for the whole of engineering - only the teams/orgs I was involved with. And since I left Apple last year I can only guess at the current state. But the direction was clearly away from Objective-C. As you can imagine, the biggest hurdle to 100% adoption is going to be bringing over legacy projects. Porting to Swift will probably always take a back seat to features, bug fixes. If the pace at Apple were more leisurely, not a suite of new OS releases every year, perhaps we could have our cake and eat it.
- eddieroger 4y agoThey can't be the ones to turn the lights off if they're not the last ones in the room. iTunes was famously Carbon for long after Apple said "use Cocoa now", but it came around. It's fine to tell everyone else "stop doing ObjC now", then to slowly strangle it out of their code as well.
- chrismsimpson 4y agoSwiftUI is an intermediate step in this transition. Expect the UIKit/AppKit bits to eventually disappear.
- grishka 4y agoExcept SwiftUI is itself built on top of AppKit/UIKit.
- jamil7 4y agoMany of the views are, but some do not bind to AppKit/UIKit and instead are drawn directly (I think maybe Image is one?). The idea is you could keep SwiftUI's API stable while deprecating AppKit/UIKit piecemeal underneath.
- chrismsimpson 4y agoThis is what I meant