Live data from Hacker News

Which programming language is used for making Windows 10?

quora.com

111–120 of 124 posts

Re: Which programming language is used for making Windows 10?

#111
post #57

Anybody interested in the history of NT should read Showstopper!: The Breakneck Race to Create Windows NT and the Next Generation at Microsoft It focuses on Dave Cutler, the father of NT

I read that book a few years ago. I've read several books about various computers projects and I usually leave with a wish that I could have worked on that project. After reading Showstopper, my main thought was, thank $deity I didn't work on that project.

I think it is because in the book Dave Cutler comes off as an asshole.

Re: Which programming language is used for making Windows 10?

#112

That’s a little surprising. I would have figured that outside the kernel/drivers, it’d be all C++.

There is a book about the development of Windows NT called show stopper. In the book they talk about this. C++ was pretty new in 1989 so Dave Cutler decided to stay with C to reduce risk.

Except for the graphics team, as they were managed by someone else. They decided to go with C++, and they were pretty much always late because everyone was learning and building the tooling around C++.

Re: Which programming language is used for making Windows 10?

#113
post #80

Earlier quoted context omitted.

That's not true. It is difficult for humans to estimate how they spend their time, but my guess is that I've spent at least 35 hours recently exploring Windows 10: Changing various settings, installing software, asking Windows-specific questions of Google Search. And I'm writing this on Windows. (Except for the Windows-specific questions, I'm not counting web use in the estimated 35 hours because of course the web mo…

Windows 10 with WSL has enough Ubuntu features built in now that there's really no reason to use a Mac, since the "it has a Unix shell" comment doesn't work anymore. Your choices for applications are much larger on Windows.

With the new ConPTY they also one of fix my last gripes about Windows. That the console sucks.

With all the changes that Microsoft is making lately I really wonder how long until Windows becomes free as in beer. With their revenue from services growing, they don't need the Windows licensing revenue as much. Making Windows free would also allow them to making Windows cloud servers cheaper. Allowing them to grow the ecosystem.

Re: Which programming language is used for making Windows 10?

#114
post #8

Earlier quoted context omitted.

You're off by a magnitude. https://cdimage.debian.org/mirror/cdimage/archive/9.7.0/sour... Source code compresses quite well, so uncompressed, this may be somewhere between 200-250 GiB.

My benchmark was SuSE, which was 1 DVD's worth. However your post now has me wondering if that didn't contain the complete sources either - just sources for server components. That said, those 12 DVDs likely cover way more than the Windows sources would. eg multiple different image editors, LibreOffice (would Windows sources include the sources for MS Office as well?) several different databases (MariaDB, PostgreSQL,…

Right. Probably it's not at the level of full debian archive, but those 500GB probably include all kinds of weird services and windows tools and programs most users never run or have a use for.

Re: Which programming language is used for making Windows 10?

#115
post #100

Earlier quoted context omitted.

There's no reason to write OS components in a language that will inherently give you a performance hit before you do any real work.

Sure, unsafe all the way. As note, Midori did power part of Bing during its existence. And Microsoft security is now advising to move new development into a mix of C#, Rust and constrained C++ (Core Guidelines).

Unsafe sounds like a really bad word, but unsafe usually also means performant. I know that's not always the case, but usually. Rust falls in the exception to that rule category, for the most part, while C# does not. Also, the people typically working on these codebases, like Linux, are very senior developers and have code reviews being done by other very senior people. So while they definitely have had a lot of bugs related to security in the language, we don't have any examples of other languages implementing something anywhere near this size that didn't have as many bugs.

Re: Which programming language is used for making Windows 10?

#116

Earlier quoted context omitted.

Windows 10 with WSL has enough Ubuntu features built in now that there's really no reason to use a Mac, since the "it has a Unix shell" comment doesn't work anymore. Your choices for applications are much larger on Windows.

With the new ConPTY they also one of fix my last gripes about Windows. That the console sucks. With all the changes that Microsoft is making lately I really wonder how long until Windows becomes free as in beer. With their revenue from services growing, they don't need the Windows licensing revenue as much. Making Windows free would also allow them to making Windows cloud servers cheaper. Allowing them to grow the ec…

I switched from Apple to Windows 10 when Apple stopped offering decent "Pro" platforms. I need NVIDIA cards for the CUDA number crunching I do. (The Mac faithful say "b.b.but you can run an Nvidia externally over Thunderbolt." Ha!)

I even used to be an Apple employee.

Windows 10 is just fine. With a tiny amount of care to choose hardware that is all "happy path" (I run dual Intel Xeons, with a SuperMicro MoBo, and now dual Nvidia 2080 Ti for scientific processing), everything works fine. (Also, don't run third-party virus scanners. Just use what's built in to Windows!)

And things that don't quite work right on Macs, like 30-bit color, etc, work great.

I run Linux and FreeBSD in VMs. I don't use WSL much, I just build many things on Windows under Powershell if I don't need Centos or FreeBSD. I find that a lot of FOSS stuff works great on Linux and native Windows and not so well on MacOS because of "non-standard" choices about directory locations, etc.

It's best to give up your prejudices and give Windows 10 a try. Microsoft really did solve almost everything.

Re: Which programming language is used for making Windows 10?

#117
post #100

Earlier quoted context omitted.

Sure, unsafe all the way. As note, Midori did power part of Bing during its existence. And Microsoft security is now advising to move new development into a mix of C#, Rust and constrained C++ (Core Guidelines).

Unsafe sounds like a really bad word, but unsafe usually also means performant. I know that's not always the case, but usually. Rust falls in the exception to that rule category, for the most part, while C# does not. Also, the people typically working on these codebases, like Linux, are very senior developers and have code reviews being done by other very senior people. So while they definitely have had a lot of bugs…

According to Google's security team 68% of exploits in Linux are due to memory corruption. Source, their keynote at Linux Kernel Summit 2018.

Check DoD security assement of Multics versus UNIX regarding ease of security exploits, and how using PL/I prevented the large majority of them. On the mobile now, the document is accessible at the Multics history site.

Or any deployment of High Integrity Computing OSes for that matter.

Re: Which programming language is used for making Windows 10?

#118

The real question is: is it compiled with the same msvc compiler that ships in the SDK? If so, they don’t even use C99. C89 all the way. That especially means no variable declaration anywhere in the function body.

Yes and no. Compiler is checked in with the (Windows) source code and is periodically updated/patched as project goes along. When SDK or DDK is released, it's the same compiler at some specific version.

Re: Which programming language is used for making Windows 10?

#119
post #86

Earlier quoted context omitted.

While MSVC doesn't have full C99 support, MSVC supported most of the features that shipped in C99 that make it much less painful to develop in C quite a number of years before C99 support formally landed in other compilers. MS will probably never support full C99 because the demand isn't there, but it's certainly not ANSI C you are expected to write.

MSVC support C11 because it a prerequisite for C++17. The limits are you need to compile in C++, so the very few changes/incompatibilities between C and C++ always bend to the C++ choices. The preprocessor isn't what people used to have in C99 so some macro still not portable.

To the best of my knowledge (i.e. not updated since C++14), C++ is no longer a strict superset of C as of C99, and there are C99 features that are not available in C++, so I'm not sure that's the case. But plenty of overlap, for sure.

Here's a community wiki answer on SO: https://stackoverflow.com/posts/47526708/revisions

Extracted portion of relevance:

    > The following C99 features are not supported by C++:
    >
    > * restricted pointers
    > * variable length arrays
    > * flexible array members
    > * static and type qualifiers in parameter array declarators
    > * compound literals
    > * designated initializers

Re: Which programming language is used for making Windows 10?

#120
post #114

Earlier quoted context omitted.

My benchmark was SuSE, which was 1 DVD's worth. However your post now has me wondering if that didn't contain the complete sources either - just sources for server components. That said, those 12 DVDs likely cover way more than the Windows sources would. eg multiple different image editors, LibreOffice (would Windows sources include the sources for MS Office as well?) several different databases (MariaDB, PostgreSQL,…

Right. Probably it's not at the level of full debian archive, but those 500GB probably include all kinds of weird services and windows tools and programs most users never run or have a use for.

Oh I'd guarantee it would. And the vast majority of those libraries will exist for backwards compatibility too. Much like with the CLI user land on Linux (GNU coreutils et al).

I think the real proof of the pudding is the footprint of a default desktop in Windows vs Ubuntu+. There was a time when Windows would literally consume one order of magnitude more disk space than Linux after a fresh install however I think things have since converged in the middle somewhat.

Going back on topic though, that looked a dev directory for Windows so would likely have contained a .git directory too. That would easily balloon the disk space used by any (mature) project's source.

+ I know you were talking about Debian, but I'm going with Ubuntu now because it's more of a desktop orientated distro and frankly it works better in Windows favour anyway due to it installing more software by default than Debian would.

Post reply on HN