If they would do it all over again, I would bet that they would have wanted to make MacOS be like iOS.
Back in the day Apple marketed macOS as a serious Unix system for scientists and engineers boasting about NASA’s use of it.
I think if Apple aspired to lockdown general purpose computing they would push the ipad pro range with more models and slowly kill off the Mac but they’re not doing that.
They still jump through the necessary hoops to be certified as UNIX® with each macOS release:
Every OS wants to be attractive to developers. Apple has a long history of underdelivering this core proposition. To me it's an odd situation to reason about - look at Apple's dev conferences and then look at what it's like on the ground in dev's reality.
Please don't. It would be a resource hog SwiftUI monstrosity like the new Settings app. And while they are at it, they would probably introduce the 46353th bespoke feature into the Swift language too, because why not?
* Apple has no aversion to Ruby, and on the contrary has multiple developers pushing for it. They themselves had MacRuby, a project that allowed one to create Mac OS X (at the time) applications with Ruby.¹
* The reason there’s even an Xcode command line tools package available officially from Apple is because of Homebrew. A third-party made it first by extracting the necessary bits and then Apple officially supported it.²
* There’s a liaison between Homebrew and Apple, who helped during the Intel to Apple Silicon transition.³
¹ https://web.archive.org/web/20100908131627/http://developer....
² I know this from a reliable source and it is public information, but it was so long ago it’s hard to find.
³ The official Homebrew Twitter account tweeted about this at the time. I no longer have a Twitter account so can’t dig it up.
Homebrew would have a good head start, because it can use a better language, ruby. But it blew its chances with many questionable choices, they are just amateurs. But as always, worse is better.