65 points · by pjmlp · 6y ago · 100 comments
The compatibility break with the .NET Framework also removed the biggest advantage I saw in C#, which was that any code that I wrote would "just work". Now there's more frameworks, standards, cores, and build flags than I care to learn, and there are all too many scenarios where it's flat impossible to do something that was trivial before.
This is the reason, for example, that PowerShell Core is past version 7 but is still missing many modules, including some key Microsoft ones. If they can't figure this out, what chance do I have? Why would I bother?
Lastly, I got fed up with Microsoft releasing yet another half-baked GUI framework. What's the latest one? MAUI? It's yet another attempt at having one framework to rule them all, which means that it'll inevitably be the lowest common denominator and not good at anything. Microsoft won't actually bother making it good enough to write a flagship application in it, and they won't write any of their own apps with it. It'll be dropped on the floor and replaced by the next incomplete GUI framework within just a few years, mark my words. That's if it's ever finished!
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 ones
Just like .NET Core's main mission was not to replace the entire .NET Framework, the same applies to PowerShell Core.
.NET Core was created to make developing .NET-based web/cloud-services easier, faster, using less space/resources at runtime, and to have a fully supported cross-platform story. And at that it has been a wild success.
Almost everything about .NET Core is better to work with than the traditional .NET Framework (at least for the workloads it was intended for), and I'm always depressed when I have to move back to work on the "old" stack.
In this regard PowerShell Core is (as I see it) not meant to fully replace regular PowerShell either, but to be a good platform to do your cross-platform dev-ops'y build and deployment scripts related to your .NET Core deliverables.
It may not be what you want it to be, but it has a clear mission, and it's delivering fairly well on that.
> Lastly, I got fed up with Microsoft releasing yet another half-baked GUI framework.
I think this applies to pretty much everyone, which is why they never catch on, and Microsoft inevitably trying to "solve" this by releasing yet another framework.
That said the MAUI-presentation on this year's Build looked pretty convincing. If I had time to spare and had some small projects/POCs I had to work on, I might had given it a spin.
(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.)
The actual issue is this new Microsoft full of half-done projects and trying to reduce engineering costs. They even try to make others write the documentation for their products... MSDN is gone and now docs are a mess.
Ballmer was a mess, but at least he got the devs-first bit right. Nowadays it is devs-last, cloud-first.
Even with its half broken implementations, .NET and Java are still the best options in tooling and managed runtime capabilities.
The saddest thing is that Microsoft actually offered that years before: Silverlight Out-of-Browser applications, that where running the same on Windows and Mac OS.
.NET Framework is a product, .NET Core is a OSS project.
When .NET 5 will ship it will be even worse since .NET Framework people will just expect things to work.
I work full time with ASP .NET Core 3.1 projects, and I don't recognise this at all. I don't think that it's correct.
I look at the new things and take what I like. For example I particularly dislike the async / await paradigm so I still use background workers (and they work absolutely fine for my needs).
Linq is sublime (I know it's already "old") : I wasn't convinced at first but now I wonder how people in other languages manage without it !
Some things are just syntactic sugar but are very practical : the ?? and .? operators, new MyOjbect { Property1 = 15}; etc etc
I'm sure there are a lot of things I don't know about the language but it's fine, i will find it when I need it.
Last week I needed to define a method body at the creation of the object and not in the class. After some lengthy googling because I didn't know how to put words on what I was looking for, I found that C# had Func and it solved my problem beautifully.
I had been away from C# for nearly 6 years, but was able to pick up Core in a couple of days. If anything, things have gotten simpler and there's fairly good cross platform support. What rapid changes are you referring to?
The whole MDIL (Windows 8/8.1) and .NET Native (Windows 10) came from WinDev, not DevDiv, hence why it has its own idiosyncratics regarding .NET support.
Now with .NET 5, it seems they are gearing towards just a better NGEN, thus shipping a kind of AOT/JIT mixed mode image, which isn't being that well received and most likely the survey to feel the community.
https://github.com/dotnet/runtime/issues/35318
coreclr.dll is currently half a megabyte smaller than the 3.1 release.
Programming language improvements can, at best, give us small decreases in accidental complexity.
Good software engineering practises (ruthless prioritisation, proper modularisation, continuous integration) etc. can have huge effects on both inherent and accidental complexity. It is much more important to spend time on those things. They are independent of specific programming language features.
However it is unfair and simply untrue to somehow also tar nodejs with that brush. Upgrading a nodejs project by a major version usually never needs any code changes
You wished that the dev world moved slower. Sorry, things move fast nowadays. The .NET team decided to stay relevant, by moving fast to keep up. That's just how it is.
Be happy you are not a Rust developer then ;)
https://docs.microsoft.com/en-us/dotnet/standard/choosing-co...
C# 9 is next on the list.
Edit: interesting, someone wrote about this a couple years ago: https://xoofx.com/blog/2018/04/06/porting-unity-to-coreclr
I wonder if there’s movement on this internally at Unity.
.NET 5 also doesn't run in all platforms that Unity targets.
Rich ecosystems only have to gain from multiple implementations.
This is a discussion about .NET AOT (CoreRT) which has been observed to have a considerable performance benefit over IL2CPP/burst (see the attached blog post in my original comment)
> .NET 5 also doesn't run in all platforms that Unity targets.
CoreRT supports C++ codegen, so in the worst case you can use that. But its first class platform support is growing. Though I suspect even then you may see some platform support differences but those can be ironed out. Given the benefits of switching to .NET CoreRT I suspect it would be worthwhile.
CoreRT is still a preview tech that has to deal with the full capabilities of .NET Framework, including VB.NET, C#, F# and C++/CLI as generators of MSIL bytecode.
I agree the the Users of Unity may or not see gains in the short term
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.
They are working on improving that: https://github.com/dotnet/designs/blob/master/accepted/2020/...
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.
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.
There's just easier languages to do it in if you really need AOT.