Re:Type erasure and reification
by seanmcdirmid on Wednesday December 05, 2018 @12:37PM
(#18610462)
You’ll see that they still get a lot of use in the interfaces of non deprecated APIs (eg WPF).
[ Parent
| on HN ]
WPF 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.
to 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.
UWP 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.
Re:Type erasure and reification
by seanmcdirmid on Wednesday December 05, 2018 @01:48PM
(#18611184)
Agreed. 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.
Can use the Desktop Bridge 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)
it'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.
UWP is just improved COM, so generics cannot be easily done as general purpose language ABI.
WinRT 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/roparam...
Yep, 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.