5 ms·
Is GUI programming in C++ still a thing, though? On Mac, you're better of with Swift/ObjC, on Windows, there's C#, and Gtk has binding to about any language. On
by Longhanks 9y ago
Is GUI programming in C++ still a thing, though? On Mac, you're better of with Swift/ObjC, on Windows, there's C#, and Gtk has binding to about any language. On mobile, C++ isn't even an option.
The only thing coming to my mind is Qt, but development of Qt Widgets has basically stopped in favor of Qt Quick, and for cross platform GUIs there's other options like Xamarin or Electron (not that I'd prefer either).
- pjmlp 9y agoOn Windows you might have C#, but WPF and UWP lower layers are actually written in C++ and based on COM. Xamarin uses C and C++ to bind the nice .NET code into the platforms they support. Qt Quick is just the layout engine, many important parts of the stack keep being C++. Apple's Metal shaders are C++14. On Android Vulkan is only exposed to the NDK and SurfaceFlinger and hardware compositor are in C++. Plus if you compare compare Rust with Objective-C, Swift, C#, Java, the productivity story regarding GUI programming doesn't get better than when comparing with C++, on the contrary.
- ygra 9y ago> On Windows you might have C#, but WPF and UWP lower layers are actually written in C++ and based on COM. Well, this doesn't really influence the language programmers have to use to build applications, considering you can use C++, C#, VB.NET, or JavaScript to your heart's content. Windows GDI is a C API, but not every application using it is written in C.
- pjmlp 9y agoStill the issue stands, from my experience Rust isn't yet at the same productivity level as C++, C#, VB.NET, or JavaScript for writing Windows GUI based applications, both for Win32 and UWP set of APIs. Yeah it will eventually get there, but it is a disservice to Rust to promote the language as it if was already possible today to do it, when most toolkits are still WIP and lifetimes aren't that friendly for the usual GUI coding patterns. This will only lead to disillusion and shy away contributors that might otherwise enjoy using the language, if they understood the current state before diving in.
- beojan 9y ago> Qt Quick is just the layout engine, many important parts of the stack keep being C++. Also, Qt Widgets isn't deprecated, it's just considered pretty much complete.
- dom0 9y agoAnd Qt Widgets won't be deprecated for a long time to come, if ever.
- develop7 9y agoSure, there's C++ here and there underneath, so what?
- whowouldathunk 9y ago> Is GUI programming in C++ still a thing, though? All of the new Windows 10 UI is C++ (using the UWP XAML framework, which is implemented in C++). The paper says metaclasses are a way to avoid language extensions like UWP's C++/Cx, which adds C# things like "interface" and "event" to C++. Disclosure: I work at Microsoft.
- pjmlp 9y agoCan you disclose anything about C++/WinRT? Things went pretty silent there.
- whowouldathunk 9y agoDon't know, but it's been discussed publicly rather recently: https://github.com/Microsoft/cppwinrt https://github.com/Microsoft/cppwinrt https://msdn.microsoft.com/en-us/magazine/mt745094.aspx https://msdn.microsoft.com/en-us/magazine/mt745094.aspx "Teams within Microsoft are already starting to use C++/WinRT to build WinRT components for the OS itself."
- pjmlp 9y agoThanks, that part I already know. My point was more about Blend, XAML tooling support and official integration into Visual Studio. So, all the things that C++/CX has today, but C++/WinRT was still catching up when that information was made public.
- pas 9y agoOh, that explains why I can't navigate in "Settings" with Alt-Left (and there's no Back button either), yet it looks like an IEView (MSWebView, Electron, etc.).
- whowouldathunk 9y agoAlt-Left goes back in Settings for me, and there is a back button at the top left of the window.