News for hackers. Stuff that matters.
Re:.NET Team Survey: Native AOT by ptx on Thursday August 06, 2020 @05:25AM (#24069374)
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.)

Re:.NET Team Survey: Native AOT by goto11 on Thursday August 06, 2020 @05:47AM (#24069493)
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 by josteink on Thursday August 06, 2020 @06:01AM (#24069568)
> 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 by goto11 on Thursday August 06, 2020 @07:05AM (#24069863)
There is no doubt multi-platform support is great for ASP.Net. The problem is that MS has coupled everything. So to take advantage of the newest version of C# you have to migrate to the platform-independent framework which may not support all libraries you are currently using. This is absurd - why are these things coupled? If I maintain some internal tool using windows forms I have no desire to rewrite to support Unix - but if I don't, I am stuck on an abandoned platform.

I think it comes down to Core was not conceived as the next version of .net but as an alternative runtime for a specialized purpose. So attention was not paid to decoupling or backwards compatibility or migration paths. And now we have a disaster which will dwarf the python 2/3 conundrum.

Re:.NET Team Survey: Native AOT by josteink on Thursday August 06, 2020 @07:32AM (#24070021)
> And now we have a disaster which will dwarf the python 2/3 conundrum.

Given that Python 3 has been around for 12 years now, and still doesn't have universal adoption, I kinda doubt this is going to be near as bad a migration as that was.

At least .NET 5 will have compatible string-types once you've upgraded your projects :)

Re:.NET Team Survey: Native AOT by goto11 on Thursday August 06, 2020 @08:07AM (#24070200)
> Given that Python 3 has been around for 12 years now, and still doesn't have universal adoption, I kinda doubt this is going to be near as bad a migration as that was.

Given that .net is much more entrenched than Python was 12 years ago, I think it going to take a lot longer! Frameworks like WebForms and WCF will not be ported, so projects depending on these will require massive rewrites. This a lot more work than fixing string encodings and putting parentheses after "print".

Re:.NET Team Survey: Native AOT by josteink on Thursday August 06, 2020 @08:20AM (#24070262)
> Frameworks like WebForms and WCF not be ported

WebForms is terrible and I see no reason for anyone to pull that monstrosity of a "I wish we had a VB/Windows WYSIWYG app-editor for the web" impedance-mismatch into a new codebase.

Applications which haven't migrated off WebForms yet, probably have little to gain by moving to .NET Core anyway.

WCF has been open-sourced[1] and ported (at least the client libraries) and you have separate community-projects[2] working on porting the rest of the stack to be compatible and usable with .NET Core.

If the community really want's to go full WCF on the new stack, they are empowered to do so.

[1] https://github.com/dotnet/wcf

[2] https://github.com/CoreWCF/CoreWCF

Re:.NET Team Survey: Native AOT by goto11 on Thursday August 06, 2020 @09:44AM (#24070779)
> WebForms is terrible

Sure, but that is beside the point. You don't make legacy code disappear just by wishing it away.

Re:.NET Team Survey: Native AOT by josteink on Thursday August 06, 2020 @05:31AM (#24069416)
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 previously was only possible using the traditional .NET Framework (4.8).

So now they are adding those use-cases to the "Core" package as well, without compromising on what .NET Core was supposed to deliver. I honestly don't see anything wrong with that.

Re:.NET Team Survey: Native AOT by goto11 on Thursday August 06, 2020 @05:52AM (#24069528)
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 by josteink on Thursday August 06, 2020 @05:58AM (#24069553)
> 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 by nycdotnet on Thursday August 06, 2020 @09:05PM (#24076994)
Business logic ports over really well - we have been able to effectively copy and paste code and the corresponding tests between a legacy .NET Framework WinForms app and .NET Core 2.0 and later service (WebAPI or gRPC) and it mostly just works. The trouble comes when the code integrates heavily with a UI stack - that’s a lot more work to port over. It was pretty hard before .NET core 2 though. But .NET 4.8 will be supported as long as Windows 10 is - probably at least another 10 years or more.
Re:.NET Team Survey: Native AOT by ptx on Thursday August 06, 2020 @05:38AM (#24069452)
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 by ta17711771 on Thursday August 06, 2020 @09:48AM (#24070810)
Which ones, if you don't mind me asking out of curiosity?
Re:.NET Team Survey: Native AOT by ptx on Friday August 07, 2020 @06:11AM (#24080310)
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.
Re:.NET Team Survey: Native AOT by jasonlhy on Saturday August 08, 2020 @07:38AM (#24090821)
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