4 ms·
This looks like not a reskin of an existing FreeBSD or Linux windows system, but an actual reimplementation of macOS. Very interesting if they can pull it off!
by adastra22 4y ago
This looks like not a reskin of an existing FreeBSD or Linux windows system, but an actual reimplementation of macOS. Very interesting if they can pull it off!
I wonder though, why start with old Objective-C cocoa APIs instead of Swift?
- kitsunesoba 4y agoThe greater bulk of the macOS userland is still written in Objective-C.
- adastra22 4y agoYeah but they expose the same ABI. If you can write in Objective-C, you could write it Swift and externally it'd be no different. And since they're reimplementing this stuff from scratch, I'm surprised they didn't just do that. (I'm saying this as someone who would be more inclined to contribute if it was written in Swift.)
- eyelidlessness 4y agoI 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.
- grishka 4y agoObjective-C is the ABI of all UI-related macOS frameworks and it would probably always be. Even if you're writing in Swift, as long as you're using AppKit, you're using Objective-C classes under the hood. There's no such thing as "Swift Cocoa APIs". And SwiftUI is an abstraction layer on top of, again, AppKit/UIKit/WatchKit, which are themselves all written in Objective-C.
- johncoatesdev 4y agoThat used to be true. https://developer.apple.com/documentation/realitykit/ https://developer.apple.com/documentation/realitykit/ https://developer.apple.com/documentation/GroupActivities https://developer.apple.com/documentation/GroupActivities
- grishka 4y agoThen a question: how does one call these APIs from another language? You can use Objective-C frameworks from anything that can call C functions, by manually doing objc_msgSend and all the related stuff. But will you have to write a Swift wrapper for these?
- fipar 4y agoI would guess that's the linker's job? I don't need to do that in my day to day job, but I do remember that as part of an OS class at school (some 20+ years ago) one of the tasks we were assigned was that we had to work in pairs of teams, where one team would implement a function and another team would implement code that called that function, the only requirement being that both teams had to use different languages. The point of the exercise was to show how, provided you had a defined API, thanks to linking you could use the best language for each job.
- grishka 4y agoIn many languages you need to somehow define the symbols you import before the linker comes into play. How would you define Swift symbols for C++? For Java? For Rust? And that's provided their linkers would actually know what the Swift ABI is — and they most probably don't. So I guess your only option would be to descend all the way down to assembly and shove the right things into the right registers and then jump to the right place.
- cxr 4y agoIt's a BSD. (Knowing that, you probably wouldn't ask them, "Why C and not C++?") As a language (and ecosystem*) Objective-C is mature and lacks complexity in a way that doesn't apply to Swift. * They definitely did not start with Objective-C and a blank slate here; they're folding in monumental amounts of third-party code