Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Why? I'm a pretty dedicated Linux user, but I'd argue that Windows NT is a far better technical architecture than GNU/Linux, it's just the Win32 and shell stuff that sucks. But in this hypothetical transition, Win32 and the shell would be one of the only things that Microsoft keeps, which seems like the worst of both worlds to me.

If we're talking hypotheticals, I'd much rather Microsoft open source the NT kernel and low-level subsystems (like ntdll.dll). Open sourcing all of Windows would be even better, but that seems nearly impossible to me.



> ... I'm a pretty dedicated Linux user, but I'd argue that Windows NT is a far better technical architecture than GNU/Linux ...

please do explain. thank you !


A few examples:

1. Unix has “everything is a file”, which is great, but it also means that you spend lots of time converting structured data to/from strings. Windows NT instead has “everything is an object”, which has the same benefits of “everything is a file”, plus the additional benefit of all the data being structured and typed. (Of course, Windows has a far worse UI for interacting with objects than Unix does for files, but the UI isn't what we're talking about here).

2. NT cleanly separates the low-level NT APIs from the higher-level subsystems [0]. Win32 isn't special at all to NT, it's just another subsystem. WSL1 was implemented as a subsystem [1], and it could cleanly support most of the Linux syscalls without needing any hacks. Similarly, it implemented full Linux filesystem semantics on top of NTFS by using the builtin attribute and alternate stream support. Wine does the reverse on Linux, but it's not nearly as clean of an architecture as NT.

3. Linux runs far more code in the kernel than NT does [2]. While this is often good for performance, it's much worse for security and reliability since kernel bugs tend to have much worse consequences than user-mode bugs. Linux and Windows have been moving in opposite directions here, with Linux moving more graphics code into the kernel with KMS [3], while Windows is moving more graphics code into userspace with WDDM [4].

4. NT was designed with much better security than Unix. Every object has an associated security token that controls its access [5], and programs can freely reduce (but not increase) the privileges granted by each token, which is a much cleaner way to implement sandboxing compared to Linux's user namespaces, where programs need to create entirely new user and filesystem hierarchies from scratch instead of just restricting the current ones. (Despite this, it's much easier for programs to implement sandboxing on Linux than on Windows)

5. Further on the security idea, Unix's concept of a single "root" account that can do everything without any restrictions is mostly a terrible idea. With Windows, there aren't any accounts that have all privileges (ignoring LocalSystem), which means that exploiting a system component usually has less consequences than on Unix. Similarly, Windows has proper RBAC [6] via UAC, so when you “Run as Administrator”, you're still running it under your account, just with an elevated security token. "sudo" is somewhat similar, except that it runs programs as root, which leads to problems with permissions on files in your home directory.

As you can see, the general theme is most components of NT have much cleaner technical designs than their corresponding components in Linux, which NT then squanders behind atrocious interfaces, while Linux puts in tons of work to create great interfaces and new features on top of much worse technical foundations. (This same argument mostly applies to the BSDs too)

[0]: https://en.wikipedia.org/wiki/Architecture_of_Windows_NT#Use...

[1]: https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux#WS...

[2]: https://en.wikipedia.org/wiki/Architecture_of_Windows_NT#Ker...

[3]: https://en.wikipedia.org/wiki/Direct_Rendering_Manager#Kerne...

[4]: https://en.wikipedia.org/wiki/Windows_Display_Driver_Model

[5]: https://en.wikipedia.org/wiki/Object_Manager

[6]: https://en.wikipedia.org/wiki/Role-based_access_control


"just the Win32 and shell stuff that sucks"

Well, it's way beyond sucks. But ok: is it even possible to run windows with just a command line ... no ui, no graphics, start menu, no file manager or is the ui too integrated into the OS?



> is it even possible to run windows with just a command line

Docker supports Windows containers [0], but this requires a Windows host so it probably doesn't help you too much. Windows PE [1] does support a GUI, but it doesn't include any of the traditional shell components. Nano Server [2] is the closest to what you're talking about, but it's been deprecated.

> start menu, no file manager or is the ui too integrated into the OS

Windows Phone [3], Windows IoT [4], and Xbox are all NT-based, and none of them include a traditional file manager or shell, but they all do have GUIs.

[0]: https://hub.docker.com/r/microsoft/windows

[1]: https://en.wikipedia.org/wiki/Windows_Preinstallation_Enviro...

[2]: https://learn.microsoft.com/en-us/previous-versions/windows-...

[3]: https://en.wikipedia.org/wiki/Windows_Phone

[4]: https://en.wikipedia.org/wiki/Windows_IoT


> but I'd argue that Windows NT is a far better technical architecture than GNU/Linux

Why don't you use it ?


1. Because it's not open source. This isn't purely an ideological thing, but that I tend to run into obscure bugs, so being able to look through the source and submit a patch is incredibly useful to me.

2. Because what I want doesn't exist. Windows NT has excellent technical foundations, but I really don't like using Win32 or any of the Windows shell stuff, but there's no way for regular consumers to use Windows NT without Win32. (WSL exists, but that still requires a full Windows installation)

3. The ecosystem. Linux tends to have much better support than Windows for the types of software that I use, and a hypothetical GNU/NT hybrid would have even worse than both Windows and Linux.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: