Live data from Hacker News

Microsoft Throws in the Towel on UWP, Elevates Win32

extremetech.com

11–20 of 104 posts

Re: Microsoft Throws in the Towel on UWP, Elevates Win32

#11

Win32‘s continued popularity (vs UWP) I’m sure has at least partially to do with how it’s all plain C, which makes it simple to support with any programming language imaginable via bindings. If they were serious about pushing UWP adoption they should’ve provided plain C bindings for it so it could be used with Rust or Python or Swift or whatever. C# and C++ aren’t everybody’s cup of tea.

This has improved recently. WinRT is basically just COM + IInspectable so it's possible to use from any language that supports the msvc abi. The gist is that Microsoft ships .midl files which can then be used to generate bindings.

C++: https://docs.microsoft.com/en-us/windows/uwp/cpp-and-winrt-a... Rust: https://crates.io/crates/winrt C: https://stackoverflow.com/questions/7436144/using-winrt-from...

etc.

Re: Microsoft Throws in the Towel on UWP, Elevates Win32

#12
post #6

How do they expect desktop developers to bet on anything MS does? Since .NET came out they constantly keep changing direction without any cohesive strategy. The server development strategy looks pretty good with MVC and now Core. But desktop development is just terrible. If I have to write a new app I will either think about making it web based or maybe use qt but I think I will avoid any MS UI toolkit.

It's simple. You wait for five years before you start developing in any given technology. By that time it will either have been substituted or polished.

UWP was a clustefuck from the beginning, especially after everyone realized that MS intended to give-up on mobile. There aren't many people who bought into it and given Microsoft's infamous support for legacy code it's no surprise that they decided to tank it. Bottom line, my guess is that very few people will be hurt by this decision. They've all moved to greener pastures long ago.

Re: Microsoft Throws in the Towel on UWP, Elevates Win32

#13
post #10
post #9

Earlier quoted context omitted.

Win32 isn't plain C. Lots of Win32 functionality is only accessible via COM, which is C++ (though using only a small subset of features so as to achieve ABI stability).

COM isn't C++. It's a language independent interface. There's no reason why COM (and therefore UWP) can't be used from C.

[deleted]

Re: Microsoft Throws in the Towel on UWP, Elevates Win32

#14
post #10
post #9

Earlier quoted context omitted.

Win32 isn't plain C. Lots of Win32 functionality is only accessible via COM, which is C++ (though using only a small subset of features so as to achieve ABI stability).

COM isn't C++. It's a language independent interface. There's no reason why COM (and therefore UWP) can't be used from C.

It can be used from C but is a huge pain that makes it obvious whoever designed the interface (or COM in general) really went off the deep end with the abstraction level. There's a major difference between a C API designed to be used from C (Win32, POSIX) and one that only happens to be usable from C.

Compare a sane "C API designed to be used from C":

https://docs.microsoft.com/en-us/windows/desktop/dlgbox/usin...

that involves nothing more than initialising a structure and calling a single function, with MS's "recommended replacement" using COM:

https://msdn.microsoft.com/en-us/library/Bb776913(v=VS.85).a...

That is a ten level deep nested if with just as many function calls, to do essentially the equivalent of the code above. The first time I saw this, I seriously thought they were taking the piss.

Re: Microsoft Throws in the Towel on UWP, Elevates Win32

#15
post #6

How do they expect desktop developers to bet on anything MS does? Since .NET came out they constantly keep changing direction without any cohesive strategy. The server development strategy looks pretty good with MVC and now Core. But desktop development is just terrible. If I have to write a new app I will either think about making it web based or maybe use qt but I think I will avoid any MS UI toolkit.

I gave up on chasing every new shiny thing MS produces. Winforms work great. They are stable - there are a million packages for it out there and it can work with the version of the framework that's installed with every copy of Windows.

Re: Microsoft Throws in the Towel on UWP, Elevates Win32

#16
post #10

Earlier quoted context omitted.

COM isn't C++. It's a language independent interface. There's no reason why COM (and therefore UWP) can't be used from C.

It can be used from C but is a huge pain that makes it obvious whoever designed the interface (or COM in general) really went off the deep end with the abstraction level. There's a major difference between a C API designed to be used from C (Win32, POSIX) and one that only happens to be usable from C. Compare a sane "C API designed to be used from C": https://docs.microsoft.com/en-us/windows/desktop/dlgbox/usin... th…

Also, that code isn't C, it's C++. Method calls are a C++ feature. While you could use COM without language support for method calls, because the ABI is stable, it isn't really something that Microsoft supports.

Re: Microsoft Throws in the Towel on UWP, Elevates Win32

#17
> One wonders what Gallo thinks Windows applications used to be called.

> Regardless, the idea that consumers would shift their application acquisition behavior just because Microsoft wanted it was a poor idea that ought to never have been implemented in the first place. It’s good to see the company catching up to the place its customers never left.

That just about sums it up for me. Good on Microsoft, I guess.

Re: Microsoft Throws in the Towel on UWP, Elevates Win32

#18
post #3

Thank god. Among other things UWP didn't allow PAGE_EXECUTE on the memory mapping calls, meaning that JITs were disallowed. That's pretty core to general purpose computing in a real way, IMO.

iOS also disallows JIT’s. I’m not saying this is okay, but it is quite clearly possible to have a successful software platform without them.

(Excluding the platform-holder’s own JIT’s, of course.)

Re: Microsoft Throws in the Towel on UWP, Elevates Win32

#19
post #6

How do they expect desktop developers to bet on anything MS does? Since .NET came out they constantly keep changing direction without any cohesive strategy. The server development strategy looks pretty good with MVC and now Core. But desktop development is just terrible. If I have to write a new app I will either think about making it web based or maybe use qt but I think I will avoid any MS UI toolkit.

I gave up on chasing every new shiny thing MS produces. Winforms work great. They are stable - there are a million packages for it out there and it can work with the version of the framework that's installed with every copy of Windows.

I have seen systems developed over decades and they are a complete mess, the worst had these components:

- vb com+ - c++ dcom - c++ mfc - .net 1.1 winform - .net 4 - wpf - delphi

Microsoft causes this by events like build which go “we are betting everything on x” then the year later it is “x was cool but look at xx”

Gahhhhhh

Re: Microsoft Throws in the Towel on UWP, Elevates Win32

#20

Earlier quoted context omitted.

It can be used from C but is a huge pain that makes it obvious whoever designed the interface (or COM in general) really went off the deep end with the abstraction level. There's a major difference between a C API designed to be used from C (Win32, POSIX) and one that only happens to be usable from C. Compare a sane "C API designed to be used from C": https://docs.microsoft.com/en-us/windows/desktop/dlgbox/usin... th…

Also, that code isn't C, it's C++. Method calls are a C++ feature. While you could use COM without language support for method calls, because the ABI is stable, it isn't really something that Microsoft supports.

I remember using C to call com components as a learning excercise - it was just that to see how it worked. You wouldn’t do it otherwise
Post reply on HN