Live data from Hacker News

.NET Team Survey: Native AOT

github.com

31–40 of 103 posts

Re: .NET Team Survey: Native AOT

#31
post #25

Earlier quoted context omitted.

But if .NET Core was not meant to replace the .NET Framework, why is Microsoft doing just that with .NET 5? (Yes, the old framework will still exist after it's been replaced - the same way VB 6 still exists after being replaced by VB.NET and IE still exists after being replaced by Edge.)

You are allowed to change your mind, aren't you? :) The goal for the initial .NET Core project was to have something cross-platform, modular and lightweight to build Linux-deployable cloud-services with. Once that reached a mature state, they could expand scope. And now, after .NET Core 3.x has landed, it has matured so much, that MS can see one single unified path forward which also includes some things which previo…

Right, but I think the complaint was that it was still immature and missing some use-cases covered by the old framework.

Anyway, I do hope they succeed and the .NET 5 unification goes smoothly. I want those C# 9 features - but I also need some old third-party libraries to keep working.

Re: .NET Team Survey: Native AOT

#32
post #25

Earlier quoted context omitted.

> The compatibility break with the .NET Framework also removed the biggest advantage I saw in C# I'll be honest here. The migration from .NET Framework to .NET Core is a pain. I see why things were done the way they were done, but it's still a real pain. That said: for green-field works NET Core is clearly superior. > PowerShell Core is past version 7 but is still missing many modules, including some key Microsoft on…

But if .NET Core was not meant to replace the .NET Framework, why is Microsoft doing just that with .NET 5? (Yes, the old framework will still exist after it's been replaced - the same way VB 6 still exists after being replaced by VB.NET and IE still exists after being replaced by Edge.)

I believe Core stated as a minimal runtime for running Asp.net on other platforms than Windows. It was understood that this would not be fully compatible with the standard framework which was too coupled to Windows.

But somewhere along the way it was decided that the core platform was the future and where all future improvement will happen. This leaves all .net framework code on a dead end platform. They will not be able to take advantage of any new improvement or even the new versions of C#.

I don't think MS deliberately decided to break backwards compatibility in .net. It just sort of happened because the core project got out of control.

Re: .NET Team Survey: Native AOT

#33
post #24

Earlier quoted context omitted.

Just this week I wanted to spin up a minimalist ASP.NET page for "tyre-kicking" of new infra builds. You know, something that just coughs up a single page with some basic info, such as the regional options, time zone, current time, and the latency to the SQL Server. This checks that the infra guys did their job and that the AD accounts and firewall ports are in place. I wanted to write 1 page with just some dynamic l…

It is strange that you couldn't find the empty web template. Every version of ASP.NET Core has come with one. Empty is the first option in the "Create a new ASP.NET Core web application" dialog in VS2019, and "dotnet new web" creates an empty website via the command line. What did you need to do to create an empty website? Disclaimer: I work on ASP.NET Core

The most minimalist ASP.NET Core template I could find made it too difficult to create a "page" with some code-behind.

I could create a CSHTML page and inline expressions worked, but I couldn't convince it to execute anything from a matching cs class.

I did google this, and it's not like I hadn't written Razor syntax pages before, but that was a few years ago and my memory was fuzzy.

What I found was that Razor pages are now part of any number of very similar sounding but wildly different frameworks, and code samples for one do literally nothing in the other. It's not even self-evident which framework I'm "in" for any given project. Half of it seems to be just convention, the other half is explicit configuration, and it's all version specific.

I tried to go back to classic ASP.NET, thinking that that's actually a better fit for the type of legacy web app server testing that I need to do. That's where I found the new project templates that pull in more code by default into an "empty" project than I've written in the past half a decade.

Re: .NET Team Survey: Native AOT

#34
post #25

Earlier quoted context omitted.

But if .NET Core was not meant to replace the .NET Framework, why is Microsoft doing just that with .NET 5? (Yes, the old framework will still exist after it's been replaced - the same way VB 6 still exists after being replaced by VB.NET and IE still exists after being replaced by Edge.)

You are allowed to change your mind, aren't you? :) The goal for the initial .NET Core project was to have something cross-platform, modular and lightweight to build Linux-deployable cloud-services with. Once that reached a mature state, they could expand scope. And now, after .NET Core 3.x has landed, it has matured so much, that MS can see one single unified path forward which also includes some things which previo…

The problem is it leaves all .net framework code on a dead-end platform. For all previous .net versions, code could be easily and safely upgraded to the next version because they were largely backwards compatible. But you can't easily upgrade existing code from 4.8 to 5.

If you want to start a project from scratch, sure Core/5 is nice.

Re: .NET Team Survey: Native AOT

#35
post #34

Earlier quoted context omitted.

You are allowed to change your mind, aren't you? :) The goal for the initial .NET Core project was to have something cross-platform, modular and lightweight to build Linux-deployable cloud-services with. Once that reached a mature state, they could expand scope. And now, after .NET Core 3.x has landed, it has matured so much, that MS can see one single unified path forward which also includes some things which previo…

The problem is it leaves all .net framework code on a dead-end platform. For all previous .net versions, code could be easily and safely upgraded to the next version because they were largely backwards compatible. But you can't easily upgrade existing code from 4.8 to 5. If you want to start a project from scratch, sure Core/5 is nice.

> For all previous .net versions, code could be easily and safely upgraded to the next version because they were largely backwards compatible. But you can't easily upgrade existing code from 4.8 to 5.

As someone who has been working with .NET since the first release: tell me about it! I fully concur. I don't deny this, nor excuse it.

That said, I believe that once Microsoft decided that it was OK to break compatibility, they managed to improve upon lots of things which up until that point had become fairly painful on the traditional .NET Framework.

You win some, you lose some, I guess?

Re: .NET Team Survey: Native AOT

#36
post #32
post #25

Earlier quoted context omitted.

But if .NET Core was not meant to replace the .NET Framework, why is Microsoft doing just that with .NET 5? (Yes, the old framework will still exist after it's been replaced - the same way VB 6 still exists after being replaced by VB.NET and IE still exists after being replaced by Edge.)

I believe Core stated as a minimal runtime for running Asp.net on other platforms than Windows. It was understood that this would not be fully compatible with the standard framework which was too coupled to Windows. But somewhere along the way it was decided that the core platform was the future and where all future improvement will happen. This leaves all .net framework code on a dead end platform. They will not be…

> It just sort of happened because the core project got out of control.

A more accurate representation of events would be that .NET Core suddenly fueled a huge interest and growth in .NET as a platform which it hadn't seen in a long time (it was actually in decline!).

Microsoft probably decided that for the overall, long-term health of the .NET platform it was more important to cater to these new users, than maintaining the status quo for the existing users, some which were already considering leaving ship.

Looking back right now, it certainly looks like that was the right decision to make.

Re: .NET Team Survey: Native AOT

#37
post #10

Earlier quoted context omitted.

MAUI is Xamarin rebranded. Even with its half broken implementations, .NET and Java are still the best options in tooling and managed runtime capabilities.

And it will be crap. What I want, and I'm sure a lot of other devs interested in making C# GUI multi-platform apps, is an UI framework à la Flutter that display the same thing everywhere. In the days of Electron apps not having a native look and feel is not a really problem anymore. The saddest thing is that Microsoft actually offered that years before: Silverlight Out-of-Browser applications, that where running the…

There are rumours of a Flutter back-end coming for Xamarin.Forms/MAUI. Or possibly a something lower level in Windows itself (which a MAUI back-end could tap into).

Re: .NET Team Survey: Native AOT

#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 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

#39
post #24

Earlier quoted context omitted.

It is strange that you couldn't find the empty web template. Every version of ASP.NET Core has come with one. Empty is the first option in the "Create a new ASP.NET Core web application" dialog in VS2019, and "dotnet new web" creates an empty website via the command line. What did you need to do to create an empty website? Disclaimer: I work on ASP.NET Core

The most minimalist ASP.NET Core template I could find made it too difficult to create a "page" with some code-behind. I could create a CSHTML page and inline expressions worked, but I couldn't convince it to execute anything from a matching cs class. I did google this, and it's not like I hadn't written Razor syntax pages before, but that was a few years ago and my memory was fuzzy. What I found was that Razor pages…

"self-evident which framework I'm "in" for any given project"

Has that changed? It's in the project properties in Visual Studio where I think it's been for as long as I can remember?

NB I've been using .Net for about 15 years and quite happily using .Net Core 3.1

Re: .NET Team Survey: Native AOT

#40

Earlier quoted context omitted.

Just this week I wanted to spin up a minimalist ASP.NET page for "tyre-kicking" of new infra builds. You know, something that just coughs up a single page with some basic info, such as the regional options, time zone, current time, and the latency to the SQL Server. This checks that the infra guys did their job and that the AD accounts and firewall ports are in place. I wanted to write 1 page with just some dynamic l…

I had VS 2019 open and tried this - creating an empty project is the first entry on the list of templates - all it contains is a minimal Program.cs and Startup.cs - nothing else. When run all it does is return "Hello World!" in plain text - it doesn't even use HTML.

GP is not talking about an empty app project.
Post reply on HN