4 ms·
Windows is written in C++ mostly. As for X11 and Gtk, well, I argue with THEM.
by coldtea 11y ago
Windows is written in C++ mostly.
As for X11 and Gtk, well, I argue with THEM.
- q3k 11y agoYes, but WinAPI (which is all that is required to do GUI programming in Windows) is C-centric.
- coldtea 11y agoYeah, but nobody (ie. very few if anybody) does GUI programming in WinAPI, so I don't see how it's relevant in determining whether C is good for GUIs.
- ultramancool 11y agoWindows itself perhaps, but not the Windows API. If you've ever done any low-level Windows development, it's pure C. See here for a tutorial using it for basic GUI stuff: http://zetcode.com/gui/winapi/firststeps/ http://zetcode.com/gui/winapi/firststeps/ I've even seen several games that use it directly for keyboard handling and such to this day. And all the new, fancy GUI frameworks which exist on Windows are basically just wrappers on top of WinAPI.
- United857 11y agoUnless something has changed drastically since when I was at MS, the Windows kernel and the major OS DLLs is pretty much pure C. The GUI/window manager are more C++. Even Word and Excel were still C (although Office shared much C++ code in a common DLL) Gotta love legacy code from the 1980s/1990s.
- pjmlp 11y agoWhen were you there? Since the new "Going native" wave, C++ has taken the role of main systems programming language, even the DDK now supports it. Regarding office check their CppCon presentation how the code was ported to C++, refactored and made portable across OS. About 2h session.
- Hydraulix989 11y ago"Going native" meant salvaging Vista's low performance by rewriting everything in C++ that was written in .NET -- .NET was the "wave" here, but it's also the culprit for Vista eating memory like cheap sushi.
- pjmlp 11y agoYet, the replacement of Win32 API model is with everything being written in the original design of .NET, with AOT native compilation and classes being COM objects. What killed Vista was politics between OSDev and DevTools units.