3 ms·
> MS actually doesn’t use generics as aggressively as it could in its API for similar reasons (eg there are two APIs for collections that use genetics and don’
by benaadams 8y ago
> MS actually doesn’t use generics as aggressively as it could in its API for similar reasons (eg there are two APIs for collections that use genetics and don’t).
Object based collections are generally deprecated over the generic versions and were existed prior to generics being introduced.
- seanmcdirmid 8y agoYou’ll see that they still get a lot of use in the interfaces of non deprecated APIs (eg WPF).
- merb 8y agoto be fair, they tried to kill of winforms and wpf. I mean they invented uwp and I doubt that they did not wanted to maintain three of these gui frameworks.
- seanmcdirmid 8y agoAgreed. But I don't think UWP uses generics very much (if at all) either. To be honest, it feels like Microsoft's UI strategy these days is either UWP for the store or just use the web.
- benaadams 8y agoCan use the Desktop Bridge https://docs.microsoft.com/en-us/windows/uwp/porting/desktop-to-uwp-root https://docs.microsoft.com/en-us/windows/uwp/porting/desktop... with .NET Core 3.0 and the newly open sourced UI frameworks to get full Jitting and Store access (UWP is microsoft-ui-xaml https://github.com/Microsoft/microsoft-ui-xaml https://github.com/Microsoft/microsoft-ui-xaml)
- merb 8y agoit's ot, but still... > Microsoft's UI strategy at the moment I really think that they do not have a strategy. I mean they even have Xamarin.Forms which is another XAML variant. which ups their UI stuff to 4. I do not see any of them being deprecated at all.
- pjmlp 8y agoUWP is just improved COM, so generics cannot be easily done as general purpose language ABI.
- int_19h 8y agoWinRT does generics by synthesizing interface specializations (so e.g. their GUID is effectively a hash of the original interface name + type parameters). Since the mapping is exposed as a public function, generics are a part of the ABI, and are mapped accordingly in language projections. https://docs.microsoft.com/en-us/windows/desktop/api/roparameterizediid/nf-roparameterizediid-rogetparameterizedtypeinstanceiid https://docs.microsoft.com/en-us/windows/desktop/api/roparam...
- pjmlp 8y agoYep, I should have been more explicit, my point by "cannot be easily done" was the amount of stuff going behind the scenes versus what happens in language runtimes. Thanks for clarifying it.
- pjmlp 8y agoUWP aka WinRT, was a .NET takeover from the WinDev team after they regained internal power with Vista replacing Longhorn and getting COM versions of the .NET designs. If you compare WinRT with the the original design from Ext-VOS (COM+ Runtime) before it became the CLR, you will find quite a few similarities.
- ygra 8y agoWPF predates generics in.NET or at least ost of the WPF APIs were stable and finished before generics were there and retrofitting generics wasn't done for some reason or another.