← Back to context

Comment by Const-me

4 years ago

> And that means many old UI elements may stay, that's a side effect.

They should stay on disk to be used by programs compiled 20 years ago.

They should not be used by OS components, nor visible to end user unless they run these old applications.

The OS already has multiple good ways to achieve that.

1. New programs can opt in to new stuff with a manifest. That’s how you get high DPI support in WinAPI: https://docs.microsoft.com/en-us/windows/win32/hidpi/setting...

2. New programs can call some API functions to enable new stuff. That’s how you get modern versions of Win32 common controls: https://docs.microsoft.com/en-us/windows/win32/api/commctrl/...

3. The OS has a lightweight virtualization layer for file system and registry, that’s how 32-bit apps view things differently: https://docs.microsoft.com/en-us/windows/win32/winprog64/fil... Microsoft could have used that thing not just for 32-bit apps, for backward compatibility too, i.e. old apps could use special compatibility view of the environment.

4. Finally, the kernel supports multiple user-mode environments, Win32 is just one of them. The initial good version of WSL (I still use it every day, too bad they have killed the awesome product moving to virtual machines in WSL 2) runs Linux binaries directly on top of Windows 10 kernel, the subsystem is implemented in lxss.sys and lxcore.sys. Microsoft could have embedded couple popular Windows versions, such as 7 and XP, as different subsystems used for running old apps.