News for hackers. Stuff that matters.
Re:.NET Team Survey: Native AOT by Roceh on Thursday August 06, 2020 @06:03AM (#24069577)
Unfortunately reflection is so widely used in .Net libraries and core frameworks that code removal during linking becomes more or a less impossible without spending A LONG TIME decorating an xml file with code removal exceptions. I have done it on Xamarin iOS, it is not fun. So one of the prime dreams of having .net AOT of having an easy way to create a COMPACT self contained native exectuable dies when it hits real code.

Source generators may solve that going forward, but that is going to take years to filter out to nuget library land.

There are other advantages of AOT, sure, but I think R2R that is in .Net already covers a lot of those.

They need to solve the poor linkability of .Net code first IMO. I think Microsoft realise that, especially if they want Blazor client side to work.

Re:.NET Team Survey: Native AOT by svick on Friday August 07, 2020 @06:07AM (#24080284)
> So one of the prime dreams of having .net AOT of having an easy way to create a COMPACT self contained native exectuable dies when it hits real code.

They are working on improving that: https://github.com/dotnet/designs/blob/master/accepted/2020/...

Re:.NET Team Survey: Native AOT by garganzol on Thursday August 06, 2020 @06:54AM (#24069804)
Reflection is not "unfortunate". Actually, it is quite helpful when used right. And there is a way to shove it with AOT.

I've tried to communicate that to some team members but got the impression they weren't so interested in solving that. Or maybe they are reluctant to take a solution from 3rd party, preferring to quickly come up with in-house code instead.

Well, this would clearly cost them at least 5 years of R&D given they are able to find the right PhDs in math and compiler theory who are able to crack that.

As for source code generators as a way to solve the reflection dilemma: they are not going to make a dent as they tied to the specific language (C#), and not to .NET platform as a whole. This makes them somewhat fragile and largely fragmented in the eyes of component vendors.

Re:.NET Team Survey: Native AOT by jmarolf on Thursday August 06, 2020 @11:31PM (#24077833)
> As for source code generators as a way to solve the reflection dilemma: they are not going to make a dent as they tied to the specific language (C#), and not to .NET platform as a whole.

Slight correction: source generators are a _compiler_ feature not a _language_ feature. This may seem like a meaningless distinction, but you can use source generators in _any_ C# project provided your compiler is new enough. You can easily use generators in a .NET 3.5/C# 5 project if you want.

Re:.NET Team Survey: Native AOT by vips7L on Saturday August 08, 2020 @10:06AM (#24091692)
Same problem in the Java world when trying to use Graal for aot.

There's just easier languages to do it in if you really need AOT.