by grishka · 5y ago · 0 comments
I saw what the API of the classic Mac OS looked like[1] the other day, and it does resemble WinAPI very much. It's procedural, many functions take descriptors, many other functions take structs you allocate and fill in, there's a DIY event loop, and so on. It even has a windows.h (lol). Apple got rid of this in 2000. It then provided a VM-style "classic environment" backwards compatibility layer in OS X for ~5 years, and Carbon library for source-level compatibility for even longer.
Apple did manage to pull this off. Why can't Microsoft do the same? Why can't they put a seamlessly integrated 95/XP/whatever VM into their system that would launch when you run a win32 application, and finally give themselves the freedom to rewrite everything from scratch, with more sensible APIs and in a more memory-safe language?
Microsoft's insistence on maintaining native backwards compatibility with software some of which is as old as me is so perplexing.
This is why Microsoft has such a huge presence in corporate - unlike you or me, most corporates do not immediately update to latest, hi tech flashy tool of the month. If something works really well, they'll keep using it, sometimes for decades. And demand that Microsoft don't break it on their OS. Microsoft will happily support them as they earn a lot from corporate licenses and support.Apple doesn't have the kind of importance that Microsoft does in corporate. Nor does Apple have to support the kind of hardware and software that Microsoft does, and so Apple's monoculture helps them makes changes to their platform faster than Microsoft can.
But why does it apparently not apply to the operating systems themselves? And how would running win32 apps in a seamless VM (a-la Apple's classic environment) break that?
As for running Win32 apps on different setups, it makes the system more complicated. When more vendors are involved, it also makes fixing things difficult - In case something breaks, Microsoft can say it is Apple's fault, and Apple will say we don't support Win32 apps, contact your developer. (Not to mention that Apple is not as corporate friendly as many others, like Microsoft, or IBM, as they are largely a business-to-consumer company and not a business-to-business company).
My idea is that Microsoft would build a special version of Windows that supports all kinds of legacy apps, and put it into a VM. And probably not update it much if ever. That would allow them to deprecate, and then remove, older APIs in the main system, which would in turn allow rewriting the internals to be less vulnerable. They totally have the resources needed to do this. And there's no technical innovation needed to do this, either.
As far as the end user is concerned, old apps still run. Except now they run in a sandboxed environment.
[1] https://en.wikipedia.org/wiki/List_of_macOS_components#Class...
From looking at the evolution of Windows, it feels like they're only capable of writing new code, but not deleting or rewriting anything existing unless absolutely necessary to support new code. Those shiny UWP apps? Yeah, they still have that win32 message loop deep inside them.