Live data from Hacker News

.NET Team Survey: Native AOT

github.com

101–103 of 103 posts

Re: .NET Team Survey: Native AOT

#101

Earlier quoted context omitted.

> There is no compatibility That's not true.

I mean for existing pre-built binary libraries built for netfx (which is what we are stuck with as dependencies in many cases) there is no way to use them under core/net5 that I’m aware of (I’d be happy to learn that it was!). E.g I have a huge library from Autodesk that targets 4.6.2 and I consume it from 4.7.1 now. I don’t think they have a plan to support a Core/net5 framework so my app can’t either. Obviously you…

There is actually a compatibility mode[1], although not everything is supported:

"Starting with .NET Standard 2.0, the .NET Framework compatibility mode was introduced. This compatibility mode allows .NET Standard and .NET Core projects to reference .NET Framework libraries. Referencing .NET Framework libraries doesn't work for all projects, such as if the library uses Windows Presentation Foundation (WPF) APIs, but it does unblock many porting scenarios."

I don't know if there are downsides or if the compatibility will be removed in the future.

https://docs.microsoft.com/en-us/dotnet/core/porting/third-p...

Re: .NET Team Survey: Native AOT

#102
post #92

Earlier quoted context omitted.

Which ones, if you don't mind me asking out of curiosity?

Which features? Mostly data classes, a.k.a. records, and (from C# 8) non-nullable references. Kotlin has had these features for years and it makes things so much easier and cleaner IMHO.

I believe they tried to keep the C# version independently from the framework version, so people can use the new C# version on a old .net framework.

But things seem impossible for some new features, for example async steam just need new feature from core CLR.

So after .C#8, they decide only to support it on .NET core

Re: .NET Team Survey: Native AOT

#103
post #38

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…

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.

Post reply on HN